openmedialibrary-linux-package/Makefile
2016-02-06 16:28:46 +05:30

32 lines
1,003 B
Makefile

VERSION=0.1
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 -o root -g root ${PROG} ${BINDIR}
${INSTALL} -m 755 -o root -g root -d ${SHAREDIR}/openmedialibrary
${INSTALL} -m 444 -o root openmedialibrary.desktop ${SHAREDIR}/applications/openmedialibrary.desktop
@cp -r openmedialibrary ${SHAREDIR}
@chown -R root:root ${SHAREDIR}/openmedialibrary
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
.PHONY: all install uninstall dist