3 # Copyright 2007-2022 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 APPSDIR = ${DATADIR}/applications
22 THEMEDIR = ${DATADIR}/icons/hicolor
29 perl -MConfig -p -e'1..1 and s/.*/$$Config{startperl}/;' \
30 -e's,\@PREFIX\@,${PREFIX},;' \
31 -e's,\@LIBDIR\@,${LIBDIR},;' \
32 -e's,\@VERSION\@,${VERSION},;' \
33 -e's,\@DATADIR\@,${DATADIR},' ${NAME} > build/${NAME}
37 ${NAME}.1: ${NAME}.pod
38 pod2man --release ${VERSION} -c '' $< > $@
40 install: all install-dirs install-icons
41 install -m 0755 build/${NAME} ${DESTDIR}${BINDIR}
42 install -m 0644 build/${NAME}.1 ${DESTDIR}${MAN1DIR}
43 install -m 0644 ${NAME}.desktop ${DESTDIR}${APPSDIR}
46 install-dirs: install-icons-dirs
47 install -d ${DESTDIR}${BINDIR}
48 install -d ${DESTDIR}${MAN1DIR}
49 install -d ${DESTDIR}${APPSDIR}
50 ${MAKE} -C po install-dirs
53 install -d ${DESTDIR}${THEMEDIR}
54 for res in ${ICONRES}; do \
55 install -d ${DESTDIR}${THEMEDIR}/$${res}x$${res}/apps; \
58 install-icons: install-icons-dirs
59 for res in ${ICONRES}; do \
60 install -m 0644 icons/${NAME}-$${res}.png ${DESTDIR}${THEMEDIR}/$${res}x$${res}/apps/${NAME}.png; \
64 for res in ${ICONRES}; do \
65 rm -f ${DESTDIR}${THEMEDIR}/$${res}x$${res}/apps/${NAME}.png; \
68 uninstall: uninstall-icons
69 rm -f ${DESTDIR}${BINDIR}/${NAME}
70 rm -f ${DESTDIR}${MAN1DIR}/${NAME}.1
71 rm -f ${DESTDIR}${APPSDIR}/${NAME}.desktop
72 ${MAKE} -C po uninstall
75 rm -rf ${NAME}-${VERSION}
76 mkdir ${NAME}-${VERSION}
77 cp -p AUTHORS ChangeLog.old ${NAME} ${NAME}.pod ${NAME}.desktop \
78 COPYING Makefile NEWS README ${NAME}-${VERSION}
79 mkdir ${NAME}-${VERSION}/po
80 cp -p po/*.po po/*.pot po/Makefile po/POTFILES po/README po/STATUS \
82 mkdir ${NAME}-${VERSION}/po/unmaint
83 cp -p po/unmaint/*.po ${NAME}-${VERSION}/po/unmaint
84 mkdir ${NAME}-${VERSION}/icons
85 cp -p icons/*.xcf icons/*.png ${NAME}-${VERSION}/icons
86 mkdir ${NAME}-${VERSION}/t
87 cp -p t/*.t ${NAME}-${VERSION}/t
88 tar cJf ${NAME}-${VERSION}.tar.xz ${NAME}-${VERSION} \
89 && rm -rf ${NAME}-${VERSION}
100 @test -h t/Clawsker.pm || ( cd t/ && ln -s ../clawsker Clawsker.pm )
103 @env DISPLAY= prove -It
105 .PHONY: all build install install-dirs install-icons-dirs install-icons
106 .PHONY: uninstall uninstall-icons clean clean-build dist
107 .PHONY: test-setup test