VERSION=0.2 PROG = bin/openmedialibrary PREFIX ?= /usr BINDIR ?= ${DESTDIR}${PREFIX}/bin SHAREDIR ?= ${DESTDIR}${PREFIX}/share INSTALL = install all: ${PROG} ${DESKTOP} install: ${PROG} @mkdir -p "${SHAREDIR}/applications" @mkdir -p "${BINDIR}" ${INSTALL} -m 555 ${PROG} ${BINDIR} ${INSTALL} -m 755 -d ${SHAREDIR}/openmedialibrary ${INSTALL} -m 444 openmedialibrary.desktop ${SHAREDIR}/applications/openmedialibrary.desktop @cp -r openmedialibrary ${SHAREDIR} clean: uninstall: @rm -rf ${BINDIR}/${PROG} ${SHAREDIR}/openmedialibrary ${SHAREDIR}/applications/openmedialibrary.desktop dist: git archive --format=tar --prefix=openmedialibrary-${VERSION}/ master | xz >openmedialibrary-${VERSION}.tar.xz PKGBUILD: PKGBUILD.in dist sed -e "s/VERSION/${VERSION}/g" -e "s/SHA1SUM/`sha1sum openmedialibrary-${VERSION}.tar.xz | cut -f1 -d' '`/g" PKGBUILD.in > PKGBUILD openmedialibrary.spec: openmedialibrary.spec.in dist sed -e "s/VERSION/${VERSION}/g" -e "s/SHA1SUM/`sha1sum openmedialibrary-${VERSION}.tar.xz | cut -f1 -d' '`/g" openmedialibrary.spec.in > openmedialibrary.spec .PHONY: all install uninstall dist