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 srcdir := $(prefix)/$(clc-uffi)
27 DOCDIR := $(prefix)/usr/share/doc/${debpkg}
30 configure: configure-stamp
33 # Add here commands to configure the package.
40 build-stamp: configure-stamp
43 # Add here commands to compile the package.
44 # Make doc isn't necessary because the docs are in the upstream version
52 rm -f build-stamp configure-stamp
54 # Add here commands to clean up after the build process.
56 rm -f debian/cl-uffi.postinst.* debian/cl-uffi.prerm.*
64 dh_installdirs --all $(clc-systems) $(clc-source) $(DOCDIR)/html \
67 # Add here commands to install the package into debian/uffi.
68 $(INSTALL) $(INSTALLFLAGS) $(shell echo src/*.cl *.system) $(srcdir)
69 $(INSTALL) $(INSTALLFLAGS) $(shell echo src/mcl/*.cl) $(srcdir)/mcl
71 $(INSTALL) $(INSTALLFLAGS) doc/html/* $(DOCDIR)/html
72 cp doc/uffi.pdf doc/cl-uffi.pdf
73 rm -f doc/cl-uffi.pdf.gz
75 $(INSTALL) $(INSTALLFLAGS) doc/cl-uffi.pdf.gz $(DOCDIR)
76 rm -f doc/cl-uffi.pdf.gz
78 # Build architecture-independent files here.
79 binary-indep: build install
82 # Build architecture-dependent files here.
83 binary-arch: build install
88 dh_installexamples examples/*.cl
99 dh_installchangelogs ChangeLog
103 dh_link -p $(debpkg) $(clc-uffi) $(clc-source)/$(pkg)
112 binary: binary-indep binary-arch
113 .PHONY: build clean binary-indep binary-arch binary install configure