]> thyrsus.com Git - comparator.git/commitdiff
Add standard productions
authorEric S. Raymond <esr@thyrsus.com>
Wed, 3 Sep 2003 16:09:14 +0000 (16:09 +0000)
committerEric S. Raymond <esr@thyrsus.com>
Wed, 3 Sep 2003 16:09:14 +0000 (16:09 +0000)
Makefile

index 0dceeae15c87038035f157e047568d21e2506d57..a6dfafac2cd4711ccf088d4d15992c32613ca750 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,8 @@
 # Makefile for the comparator tool
 
-SOURCES = shredtree.c shredcompare.c main.c md5.c md5.h
+VERS=0.1
+
+SOURCES = shredtree.c shredcompare.c main.c md5.c md5.h filterator
 DOCS    = README comparator.xml
 EXTRAS  = shredtree.py shredcompare.py
 TEST    = test1 test2 test3 test4
@@ -29,3 +31,29 @@ test-a: comparator
        comparator test1 test2
 test-b: comparator
        comparator test3 test4
+
+install: comparator.1 uninstall
+       install -m 755 -o 0 -g 0 -d $(ROOT)/usr/bin/
+       install -m 755 -o 0 -g 0 comparator $(ROOT)/usr/bin/comparator
+       install -m 755 -o 0 -g 0 filterator $(ROOT)/usr/bin/filterator
+       install -m 755 -o 0 -g 0 -d $(ROOT)/usr/share/man/man1/
+       install -m 755 -o 0 -g 0 comparator.1 $(ROOT)/usr/share/man/man1/comparator.1
+
+uninstall:
+       rm -f ${ROOT}/usr/bin/comparator 
+       rm -f ${ROOT}/usr/bin/filterator 
+       rm -f ${ROOT}/usr/share/man/man6/comparator.1
+
+comparator-$(VERS).tar.gz: $(SOURCES) comparator.6
+       @ls $(SOURCES) comparator.6 | sed s:^:comparator-$(VERS)/: >MANIFEST
+       @(cd ..; ln -s comparator comparator-$(VERS))
+       (cd ..; tar -czvf comparator/comparator-$(VERS).tar.gz `cat comparator/MANIFEST`)
+       @(cd ..; rm comparator-$(VERS))
+
+dist: comparator-$(VERS).tar.gz
+
+RPMROOT=/usr/src/redhat
+rpm: dist
+       rpmbuild -ta comparator-$(VERS).tar.gz
+       cp $(RPMROOT)/RPMS/*/comparator-$(VERS)*.rpm .
+       cp $(RPMROOT)/SRPMS/comparator-$(VERS)*.src.rpm .