2016-02-06 11:24:15 +00:00
|
|
|
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}"
|
2016-02-06 11:24:15 +00:00
|
|
|
${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
|
|
|
|
|
2016-02-06 11:24:15 +00:00
|
|
|
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
|