2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
5 # Uncomment this to turn on verbose mode.
8 # This is the debhelper compatibility version to use.
13 prefix := debian/$(debpkg)
16 INSTALLFLAGS := -g root -o root -m 0644
17 INSTALLDIRFLAGS := -d -g root -o root -m 0755
19 UPSTREAM_VER := $(shell sed -n -e "s/${debpkg} (\(.*\)-[0-9.]).*/\1/p" < debian/changelog |head -1)
21 pkg-ver := $(debpkg)-$(UPSTREAM_VER)
22 clc-source := usr/share/common-lisp/source
23 clc-systems := usr/share/common-lisp/systems
24 clc-uffi := $(clc-source)/$(pkg)-$(UPSTREAM_VER)
26 pkg-doc := usr/share/doc/${debpkg}
27 lispfiles := $(prefix)/$(clc-uffi)
28 docfiles := $(prefix)/$(pkg-doc)
31 configure: configure-stamp
34 # Add here commands to configure the package.
41 build-stamp: configure-stamp
44 # Add here commands to compile the package.
45 # Make doc isn't necessary because the docs are in the upstream version
53 rm -f build-stamp configure-stamp
55 # Add here commands to clean up after the build process.
57 rm -f debian/cl-uffi.postinst.* debian/cl-uffi.prerm.*
65 dh_installdirs --all $(clc-systems) $(clc-source)
66 dh_installdirs -p $(debpkg) $(pkg-doc)/html $(clc-uffi)/mcl
68 # Add here commands to install the package into debian/uffi.
69 $(INSTALL) $(INSTALLFLAGS) $(shell echo src/*.cl *.system) $(lispfiles)
70 $(INSTALL) $(INSTALLFLAGS) $(shell echo src/mcl/*.cl) $(lispfiles)/mcl
73 (cd doc; tar xzf html.tar.gz; cd ..)
74 $(INSTALL) $(INSTALLFLAGS) doc/html/* $(docfiles)/html
76 cp doc/uffi.pdf doc/cl-uffi.pdf
77 rm -f doc/cl-uffi.pdf.gz
79 $(INSTALL) $(INSTALLFLAGS) doc/cl-uffi.pdf.gz $(docfiles)
80 rm -f doc/cl-uffi.pdf.gz
82 # Build architecture-independent files here.
83 binary-indep: build install
86 # Build architecture-dependent files here.
87 binary-arch: build install
92 dh_installexamples examples/*.cl
103 dh_installchangelogs ChangeLog
107 dh_link -p $(debpkg) $(clc-uffi) $(clc-source)/$(pkg)
116 binary: binary-indep binary-arch
117 .PHONY: build clean binary-indep binary-arch binary install configure