Browse Source

Stop shipping pre-build man pages since it violates Debian arcane rule #134931e+26 and add manpages build target.

Adam Ierymenko 9 years ago
parent
commit
2e890580fc
9 changed files with 45 additions and 6 deletions
  1. 5 0
      debian/changelog
  2. 1 0
      debian/compat
  3. 18 0
      debian/control
  4. 0 0
      debian/copyright
  5. 1 0
      debian/format
  6. 3 0
      debian/rules
  7. 1 1
      doc/README.md
  8. 8 3
      doc/build.sh
  9. 8 2
      make-linux.mk

+ 5 - 0
debian/changelog

@@ -0,0 +1,5 @@
+zerotier-one (1.1.5) UNRELEASED; urgency=medium
+
+  * Initial release. (Closes: #XXXXXX)
+
+ -- root <root@linux-mercury-debian>  Wed, 08 Jun 2016 10:05:01 -0700

+ 1 - 0
debian/compat

@@ -0,0 +1 @@
+9

+ 18 - 0
debian/control

@@ -0,0 +1,18 @@
+Source: zerotier-one
+Maintainer: Adam Ierymenko <[email protected]>
+Section: net
+Priority: optional
+Standards-Version: 3.9.2
+Build-Depends: debhelper (>= 9), nodejs (>= 0.10.0), libhttp-parser-dev (>= 2.1), liblz4-dev, npm (>= 1.4.0)
+Vcs-Git: git://github.com/zerotier/ZeroTierOne
+Vcs-Browser: https://github.com/zerotier/ZeroTierOne
+Homepage: https://www.zerotier.com/
+
+Package: zerotier-one
+Architecture: any
+Depends:
+Description: ZeroTier network virtualization service
+ ZeroTier One lets you join ZeroTier virtual networks and
+ have them appear as tun/tap ports on your system. See
+ https://www.zerotier.com/ for instructions and
+ documentation.

+ 0 - 0
debian/copyright


+ 1 - 0
debian/format

@@ -0,0 +1 @@
+3.0 (quilt)

+ 3 - 0
debian/rules

@@ -0,0 +1,3 @@
+#!/usr/bin/make -f
+%:
+	dh $@

+ 1 - 1
doc/README.md

@@ -1,4 +1,4 @@
 Manual Pages and Other Documentation
 =====
 
-To build the Linux/Unix manual pages type "./build.sh." You'll need NodeJS since if it's not here already the build script will pull [marked-man](https://github.com/kapouer/marked-man), which is a MarkDown to ROFF/man converter. We pre-build and ship the compiled man pages, so running build.sh is not essential unless the source MarkDown files have changed.
+Use "./build.sh" to build the manual pages. You'll need NodeJS and npm installed.

+ 8 - 3
doc/build.sh

@@ -14,8 +14,13 @@ fi
 
 rm -f *.1 *.8
 
-node_modules/marked-man/bin/marked-man zerotier-cli.1.md >zerotier-cli.1
-node_modules/marked-man/bin/marked-man zerotier-idtool.1.md >zerotier-idtool.1
-node_modules/marked-man/bin/marked-man zerotier-one.8.md >zerotier-one.8
+NODE=/usr/bin/node
+if [ -e /usr/bin/nodejs ]; then
+	NODE=/usr/bin/nodejs
+fi
+
+$NODE node_modules/marked-man/bin/marked-man zerotier-cli.1.md >zerotier-cli.1
+$NODE node_modules/marked-man/bin/marked-man zerotier-idtool.1.md >zerotier-idtool.1
+$NODE node_modules/marked-man/bin/marked-man zerotier-one.8.md >zerotier-one.8
 
 exit 0

+ 8 - 2
make-linux.mk

@@ -114,7 +114,7 @@ endif
 #LDFLAGS=
 #STRIP=echo
 
-all:	one
+all:	one manpages
 
 one:	$(OBJS) service/OneService.o one.o osdep/LinuxEthernetTap.o
 	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o zerotier-one $(OBJS) service/OneService.o one.o osdep/LinuxEthernetTap.o $(LDLIBS)
@@ -138,11 +138,17 @@ selftest:	$(OBJS) selftest.o
 	$(CXX) $(CXXFLAGS) $(LDFLAGS) -o zerotier-selftest selftest.o $(OBJS) $(LDLIBS)
 	$(STRIP) zerotier-selftest
 
+manpages:	FORCE
+	cd doc ; ./build.sh
+
 clean: FORCE
-	rm -rf *.so *.o netcon/*.a node/*.o controller/*.o osdep/*.o service/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o ext/miniupnpc/*.o ext/libnatpmp/*.o $(OBJS) zerotier-one zerotier-idtool zerotier-cli zerotier-selftest zerotier-netcon-service build-* ZeroTierOneInstaller-* *.deb *.rpm .depend netcon/.depend doc/node_modules
+	rm -rf *.so *.o netcon/*.a node/*.o controller/*.o osdep/*.o service/*.o ext/http-parser/*.o ext/lz4/*.o ext/json-parser/*.o ext/miniupnpc/*.o ext/libnatpmp/*.o $(OBJS) zerotier-one zerotier-idtool zerotier-cli zerotier-selftest zerotier-netcon-service build-* ZeroTierOneInstaller-* *.deb *.rpm .depend netcon/.depend doc/*.1 doc/*.2 doc/*.8
 	find netcon -type f \( -name '*.o' -o -name '*.so' -o -name '*.1.0' -o -name 'zerotier-one' -o -name 'zerotier-cli' -o -name 'zerotier-netcon-service' \) -delete
 	find netcon/docker-test -name "zerotier-intercept" -type f -delete
 
+distclean:	clean
+	rm -rf doc/node_modules
+
 debug:	FORCE
 	make ZT_DEBUG=1 one
 	make ZT_DEBUG=1 selftest