chiark / gitweb /
dynamically generate the TOC in the package description from developers-reference...
[developers-reference.git] / debian / rules
index 516a3e6208d1c467ac03e672be5e3d883ce5312e..a24215d7299a128136f89c40ada83a854fdb7fb9 100755 (executable)
@@ -86,8 +86,11 @@ binary-indep:        build
        sh -n debian/postinst
        sh -n debian/prerm
 #       install the control files
-       $(install_script) debian/control debian/postinst debian/prerm   \
-               $(prefix)/DEBIAN/
+       $(install_script) debian/postinst debian/prerm  $(prefix)/DEBIAN/
+       # be tricky about putting the TOC sections into the description of the package
+       cp debian/control debian/control.out
+       perl -ne '/^\d+\.\s/ && print "    $$_";' < developers-reference.txt >> debian/control.out
+       $(install_file) debian/control.out $(prefix)/DEBIAN/control
 
 #       compress docdir (policy)       
        find $(docdir) -type f \( -size +4k -or -iname "change*" \)     \