~fredg/twapake

f4de84094ec0248d69f62559811cda6e09b5b55c — Fred. Galusik 7 years ago 1e11105
replace install.sh script and fix perl dir
1 files changed, 42 insertions(+), 0 deletions(-)

A Makefile
A Makefile => Makefile +42 -0
@@ 0,0 1,42 @@
# twapake - play with Slackware last installed packages
# See COPYING for copyright

VERSION=0.5.1

PREFIX=/usr
PERLDIR=${PREFIX}/share/perl5/vendor_perl/Twapake

man_clean:
	@echo cleaning twapake.8
	@rm -f twapake.8

man: man_clean
	@echo creating man page
	@txt2tags twapake.t2t

tarball: man
	@echo creating tarball
	@mkdir -p twapake-${VERSION}
	@cp -a AUTHORS COPYING ChangeLog INSTALL Makefile README TODO Twacurse.pm Twapake.pm twapake twapake.8 twapake-${VERSION}
	@tar czvf twapake-${VERSION}.tar.gz twapake-${VERSION}
	@rm -rf twapake-${VERSION}

install:
	@echo installing executable file to ${DESTDIR}${PREFIX}/sbin
	@install -D -m 755 twapake ${DESTDIR}${PREFIX}/sbin/twapake
	@echo installing twapake perl modules to ${DESTDIR}${PERLDIR}
	@install -D -m 644 Twapake.pm ${DESTDIR}/${PERLDIR}/Twapake.pm
	@install -D -m 644 Twacurse.pm ${DESTDIR}${PERLDIR}/Twacurse.pm
	@echo installing man page to ${DESTDIR}${PREFIX}/usr/man/man8/
	@install -D -m 644 twapake.8 ${DESTDIR}${PREFIX}/man/man8/twapake.8

uninstall:
	@echo removing ${PREFIX}/sbin/twapake
	@rm -f ${PREFIX}/sbin/twapake
	@echo removing ${PREFIX}/man/man8/twapake.8
	@rm -f ${PREFIX}/man/man8/twapake.8
	@echo removing ${PERLDIR}
	@rm -Rf ${PERLDIR}

.PHONY: man_clean man tarball install uninstall