Browse Source

Distribution!

Douglas William Thrift 14 years ago
parent
commit
61268ae468
2 changed files with 7 additions and 2 deletions
  1. 1 0
      .gitignore
  2. 6 2
      GNUmakefile

+ 1 - 0
.gitignore

@@ -1 +1,2 @@
 *.8
+*.tar.bz2

+ 6 - 2
GNUmakefile

@@ -19,22 +19,26 @@
 #  limitations under the License.
 
 all := apt-p2p-clean.8
+tarname := $(shell ./apt-p2p-clean -v | sed -e 's/ /-/g')
 prefix := /usr
 sbindir := ${prefix}/sbin
 man8dir := ${prefix}/share/man/man8
 
-.PHONY: all clean install uninstall
+.PHONY: all clean dist install uninstall
 
 all: $(all)
 
 apt-p2p-clean.8: apt-p2p-clean.8.in
 
-%.8: % GNUmakefile
+%.8: %
 	help2man -I $@.in -Nn '$(shell sed -e '$$ s/^# //p;d' $<)' -o $@ -s 8 $(shell realpath $<)
 
 clean:
 	rm -f $(all)
 
+dist: $(all)
+	bsdtar -cf $(tarname).tar.bz2 -js '#^.#$(tarname)#' -v --exclude '*.tar.bz2' --exclude '.git*' .
+
 install: $(all)
 	install -cdv $(DESTDIR)$(sbindir) $(DESTDIR)$(man8dir)
 	install -cv apt-p2p-clean $(DESTDIR)$(sbindir)/apt-p2p-clean