X-Git-Url: http://git.kpe.io/?a=blobdiff_plain;f=debian%2Frules;h=723f3a8045c5ada23ef70de71db833b78472484a;hb=edda18956f6ed03ccaf461011c1f54ffc6d40148;hp=104b04f525c32e59b652502644f050e0addacbab;hpb=d33fc1dd480aefb9cc05b5108575286316a905b6;p=uffi.git diff --git a/debian/rules b/debian/rules index 104b04f..723f3a8 100755 --- a/debian/rules +++ b/debian/rules @@ -3,22 +3,29 @@ # GNU copyright 1997 to 1999 by Joey Hess. # Uncomment this to turn on verbose mode. -export DH_VERBOSE=1 +# export DH_VERBOSE=1 # This is the debhelper compatibility version to use. -export DH_COMPAT=3 +export DH_COMPAT=4 -pkg := cl-uffi -prefix := debian/$(pkg) +pkg := uffi +debpkg := cl-uffi +prefix := debian/$(debpkg) INSTALL := install INSTALLFLAGS := -g root -o root -m 0644 INSTALLDIRFLAGS := -d -g root -o root -m 0755 -SOURCEDIR := $(prefix)/usr/share/common-lisp/source -REPOSITORYDIR := $(prefix)/usr/share/common-lisp/repositories/uffi -SYSDIR := $(prefix)/usr/share/common-lisp/systems -DOCDIR := $(prefix)/usr/share/doc/cl-uffi +UPSTREAM_VER := $(shell sed -n -e "s/${debpkg} (\(.*\)-[0-9.]).*/\1/p" < debian/changelog |head -1) + +pkg-ver := $(debpkg)-$(UPSTREAM_VER) +clc-source := usr/share/common-lisp/source +clc-systems := usr/share/common-lisp/systems +clc-uffi := $(clc-source)/$(pkg)-$(UPSTREAM_VER) + +pkg-doc := usr/share/doc/${debpkg} +lispfiles := $(prefix)/$(clc-uffi) +docfiles := $(prefix)/$(pkg-doc) configure: configure-stamp @@ -35,8 +42,8 @@ build-stamp: configure-stamp dh_testdir # Add here commands to compile the package. - $(MAKE) doc - #/usr/bin/docbook-to-man debian/uffi.sgml > uffi.1 + # Make doc isn't necessary because the docs are in the upstream version + # $(MAKE) doc touch build-stamp @@ -55,26 +62,27 @@ install: build dh_testdir dh_testroot dh_clean -k - dh_installdirs + dh_installdirs --all $(clc-systems) $(clc-source) + dh_installdirs -p $(debpkg) $(pkg-doc)/html $(clc-uffi)/mcl # Add here commands to install the package into debian/uffi. - $(INSTALL) $(INSTALLDIRFLAGS) $(REPOSITORYDIR) $(REPOSITORYDIR)/mcl $(SYSDIR) $(DOCDIR) $(DOCDIR)/html $(SOURCEDIR) - $(INSTALL) $(INSTALLFLAGS) uffi.system.debian $(SYSDIR) - mv $(SYSDIR)/uffi.system.debian $(SYSDIR)/uffi.system - $(INSTALL) $(INSTALLFLAGS) $(shell echo src/*.cl) $(REPOSITORYDIR) - $(INSTALL) $(INSTALLFLAGS) $(shell echo src/mcl/*.cl) $(REPOSITORYDIR)/mcl - $(INSTALL) $(INSTALLFLAGS) doc/html/* $(DOCDIR)/html - cp doc/uffi.ps doc/cl-uffi.ps - rm -f doc/cl-uffi.ps.gz - gzip doc/cl-uffi.ps - $(INSTALL) $(INSTALLFLAGS) doc/cl-uffi.ps.gz $(DOCDIR) - rm -f doc/cl-uffi.ps.gz + $(INSTALL) $(INSTALLFLAGS) $(shell echo src/*.cl *.system) $(lispfiles) + $(INSTALL) $(INSTALLFLAGS) $(shell echo src/mcl/*.cl) $(lispfiles)/mcl + + rm -rf doc/html + (cd doc; tar xzf html.tar.gz; cd ..) + $(INSTALL) $(INSTALLFLAGS) doc/html/* $(docfiles)/html + rm -rf doc/html + cp doc/uffi.pdf doc/cl-uffi.pdf + rm -f doc/cl-uffi.pdf.gz + gzip doc/cl-uffi.pdf + $(INSTALL) $(INSTALLFLAGS) doc/cl-uffi.pdf.gz $(docfiles) + rm -f doc/cl-uffi.pdf.gz # Build architecture-independent files here. binary-indep: build install - # Build architecture-dependent files here. binary-arch: build install dh_testdir @@ -93,14 +101,14 @@ binary-arch: build install # dh_installinfo # dh_undocumented dh_installchangelogs ChangeLog - dh_link dh_strip dh_compress dh_fixperms + dh_link -p $(debpkg) $(clc-uffi) $(clc-source)/$(pkg) # dh_makeshlibs dh_installdeb # dh_perl -# dh_shlibdeps + dh_shlibdeps dh_gencontrol dh_md5sums dh_builddeb