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) $(INSTALLDIRFLAGS) $(clc-source)
64 $(INSTALL) $(INSTALLFLAGS) $(shell echo src/*.cl *.system) $(clc-source)
65 $(INSTALL) $(INSTALLFLAGS) $(shell echo src/mcl/*.cl) $(clc-source)/mcl
66 $(INSTALL) $(INSTALLFLAGS) doc/html/* $(DOCDIR)/html
67 cp doc/uffi.pdf doc/cl-uffi.pdf
68 rm -f doc/cl-uffi.pdf.gz
70 $(INSTALL) $(INSTALLFLAGS) doc/cl-uffi.pdf.gz $(DOCDIR)
71 rm -f doc/cl-uffi.pdf.gz
73 # Build architecture-independent files here.
74 binary-indep: build install
77 # Build architecture-dependent files here.
78 binary-arch: build install
83 dh_installexamples examples/*.cl
94 dh_installchangelogs ChangeLog
95 dh_link $(clc-source) $(SOURCEDIR)
107 binary: binary-indep binary-arch
108 .PHONY: build clean binary-indep binary-arch binary install configure