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 SOURCEDIR := $(prefix)/usr/share/common-lisp/source/${pkg}
20 DOCDIR := $(prefix)/usr/share/doc/${debpkg}
22 UPSTREAM_VER := $(shell sed -n -e "s/${DEBPKG} (\(.*\)-[0-9.]).*/\1/p" < debian/changelog |head -1)
24 clc-source: := $(SOURCEDIR)-$(UPSTREAM_VER)
26 configure: configure-stamp
29 # Add here commands to configure the package.
36 build-stamp: configure-stamp
39 # Add here commands to compile the package.
40 # Make doc isn't necessary because the docs are in the upstream version
48 rm -f build-stamp configure-stamp
50 # Add here commands to clean up after the build process.
52 rm -f debian/cl-uffi.postinst.* debian/cl-uffi.prerm.*
62 # Add here commands to install the package into debian/uffi.
63 $(INSTALL) $(INSTALLFLAGS) $(shell echo src/*.cl *.system) $(clc-source)
64 $(INSTALL) $(INSTALLFLAGS) $(shell echo src/mcl/*.cl) $(clc-source)/mcl
65 $(INSTALL) $(INSTALLFLAGS) doc/html/* $(DOCDIR)/html
66 cp doc/uffi.pdf doc/cl-uffi.pdf
67 rm -f doc/cl-uffi.pdf.gz
69 $(INSTALL) $(INSTALLFLAGS) doc/cl-uffi.pdf.gz $(DOCDIR)
70 rm -f doc/cl-uffi.pdf.gz
72 # Build architecture-independent files here.
73 binary-indep: build install
76 # Build architecture-dependent files here.
77 binary-arch: build install
82 dh_installexamples examples/*.cl
93 dh_installchangelogs ChangeLog
94 dh_link $(clc-source) $(SOURCEDIR)
106 binary: binary-indep binary-arch
107 .PHONY: build clean binary-indep binary-arch binary install configure