3 # Copyright 2007-2015 Ricardo Mones <ricardo@mones.org>
5 # This program is free software: you can redistribute it and/or modify
6 # it under the terms of the GNU General Public License as published by
7 # the Free Software Foundation, either version 3 of the License, or
8 # (at your option) any later version.
10 # See COPYING file for license details.
16 BINDIR = ${PREFIX}/bin
17 DATADIR = ${PREFIX}/share
18 LIBDIR = ${PREFIX}/lib/${NAME}
19 MANDIR = ${DATADIR}/man
20 MAN1DIR = ${MANDIR}/man1
21 THEMEDIR = ${DATADIR}/icons/hicolor
28 sed -e "s,@PREFIX@,${PREFIX},;s,@LIBDIR@,${LIBDIR},;s,@VERSION@,${VERSION},;s,@DATADIR@,${DATADIR}," < ${NAME} > build/${NAME}
29 pod2man --release ${VERSION} -c '' ${NAME}.pod > build/${NAME}.1
33 install: all install-dirs install-icons
34 install -m 0755 build/${NAME} ${DESTDIR}${BINDIR}
35 install -m 0644 build/${NAME}.1 ${DESTDIR}${MAN1DIR}
38 install-dirs: install-icons-dirs
39 install -d ${DESTDIR}${BINDIR}
40 install -d ${DESTDIR}${MAN1DIR}
41 ${MAKE} -C po install-dirs
44 install -d ${DESTDIR}${THEMEDIR}
45 for res in ${ICONRES}; do \
46 install -d ${DESTDIR}${THEMEDIR}/$${res}x$${res}/apps; \
50 for res in ${ICONRES}; do \
51 install -m 0644 icons/${NAME}-$${res}.png ${DESTDIR}${THEMEDIR}/$${res}x$${res}/apps/${NAME}.png; \
55 for res in ${ICONRES}; do \
56 rm -f ${DESTDIR}${THEMEDIR}/$${res}x$${res}/apps/${NAME}.png; \
59 uninstall: uninstall-icons
60 rm -f ${DESTDIR}${BINDIR}/${NAME}
61 rm -f ${DESTDIR}${MAN1DIR}/${NAME}.1
62 ${MAKE} -C po uninstall
65 rm -rf ${NAME}-${VERSION}
66 mkdir ${NAME}-${VERSION}
67 cp -p AUTHORS ChangeLog.old clawsker clawsker.pod \
68 COPYING Makefile NEWS README ${NAME}-${VERSION}
69 cp -rp po ${NAME}-${VERSION}
70 cp -rp icons ${NAME}-${VERSION}
71 tar cJf ${NAME}-${VERSION}.tar.xz ${NAME}-${VERSION} \
72 && rm -rf ${NAME}-${VERSION}
81 .PHONY: all build install install-dirs uninstall clean clean-build dist