chiark / gitweb /
fix a bug in how we deal with debian/control
[developers-reference.git] / debian / rules
index dfeabea7a93613615e35db0255a90602a1225506..5dc8af327ace129f128f4c98353656918478c918 100755 (executable)
@@ -10,7 +10,6 @@ package               := developers-reference
 # directory abstraction
 prefix         := debian/tmp
 docdir         := $(prefix)/usr/doc/$(package)
-libdir         := $(prefix)/usr/lib/$(package)
 sharedir       := $(prefix)/usr/share/$(package)
 docbasedir     := $(prefix)/usr/share/doc-base
 
@@ -68,7 +67,7 @@ binary-indep: build
        $(checkroot)
        rm -rf $(prefix)
        $(make_directory) $(prefix)/DEBIAN
-       $(make_directory) $(docdir) $(libdir) $(sharedir) $(docbasedir)
+       $(make_directory) $(docdir) $(sharedir) $(docbasedir)
 
        $(make_directory) $(docdir)/developers-reference.html
        $(install_file) developers-reference.html/*                     \
@@ -86,9 +85,7 @@ binary-indep: build
 #       make sure control files are good
        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/
 
 #       compress docdir (policy)       
        find $(docdir) -type f \( -size +4k -or -iname "change*" \)     \
@@ -96,6 +93,10 @@ binary-indep:        build
                ! -name "copyright" | xargs $(compress)
 
        dpkg-gencontrol -isp
+#       be tricky about putting the TOC sections into the description of the package
+       perl -ne '/^\d+\.\s/ && print "    $$_";' < developers-reference.txt \
+               >> $(prefix)/DEBIAN/control
+
        dpkg --build $(prefix) ..
 
 #       some extra-package files