test/Makefile.am
author J. Ali Harlow <ali@juiblex.co.uk>
Fri Jun 12 16:59:11 2009 +0100 (2009-06-12)
changeset 369 f8c27fe9fe63
parent 363 c75a2d5caae9
child 378 ee438b1e94c0
permissions -rw-r--r--
Add basic support for uninstall scripts.
RPM_INSTALL_PREFIX{n} is not yet supported and upgrading a package
where an uninstall script changes may need more work to ensure the
old script doesn't get included in the merged set (when it is too
late to remove). I haven't yet tested whether this is a real problem.
     1 ## Process this file with automake to produce Makefile.in
     2 
     3 check_SCRIPTS = relocate named-root remove
     4 if HAVE_LUA
     5   check_SCRIPTS += lua
     6 endif
     7 check_SCRIPTS += order
     8 
     9 relocate:	relocate.sh primary.xml.gz
    10 	cp $(srcdir)/relocate.sh relocate
    11 
    12 named-root:	named-root.sh primary.xml.gz
    13 	cp $(srcdir)/named-root.sh named-root
    14 
    15 remove:	remove.sh primary.xml.gz
    16 	cp $(srcdir)/remove.sh remove
    17 
    18 order:	order.sh primary.xml.gz
    19 	cp $(srcdir)/order.sh order
    20 
    21 lua:	lua.sh primary.xml.gz
    22 	cp $(srcdir)/lua.sh lua
    23 
    24 primary.xml.gz:	zsh.spec zsh2.spec zip.spec zap.spec filesystem.spec Makefile
    25 	rm -rf rpmbuild rpms repodata
    26 	mkdir -p rpmbuild/BUILD rpmbuild/RPMS
    27 	rpmbuild --define "_topdir `pwd`/rpmbuild" -bb $(srcdir)/zap.spec
    28 	rpmbuild --define "_topdir `pwd`/rpmbuild" -bb $(srcdir)/zip.spec
    29 	rpmbuild --define "_topdir `pwd`/rpmbuild" -bb $(srcdir)/zsh.spec
    30 	rpmbuild --define "_topdir `pwd`/rpmbuild" -bb $(srcdir)/zsh2.spec
    31 	rpmbuild --define "_topdir `pwd`/rpmbuild" -bb $(srcdir)/filesystem.spec
    32 	mkdir rpms
    33 	mv rpmbuild/RPMS/noarch/*.rpm rpms
    34 	rm -rf rpmbuild
    35 	createrepo -o . rpms
    36 	cp repodata/primary.xml.gz repodata/filelists.xml.gz .
    37 
    38 TESTS = $(check_SCRIPTS)
    39 
    40 EXTRA_DIST = 			\
    41 	zap.spec		\
    42 	zip.spec		\
    43 	zsh.spec		\
    44 	zsh2.spec		\
    45 	filesystem.spec		\
    46 	order.sh		\
    47 	lua.sh			\
    48 	remove.sh		\
    49 	named-root.sh		\
    50 	relocate.sh
    51 
    52 clean-local :
    53 	rm -f *~
    54