openmedialibrary-linux-package/Makefile

35 lines
1.1 KiB
Makefile
Raw Normal View History

VERSION=0.2
2016-01-27 18:09:58 +00:00
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
2016-01-27 18:09:58 +00:00
@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
2016-01-27 18:09:58 +00:00
.PHONY: all install uninstall dist