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 pkg-ver := $(debpkg)-$(UPSTREAM_VER)
25 clc-source := $(SOURCEDIR)-$(UPSTREAM_VER)
27 configure: configure-stamp
30 # Add here commands to configure the package.
37 build-stamp: configure-stamp
40 # Add here commands to compile the package.
41 # Make doc isn't necessary because the docs are in the upstream version
49 rm -f build-stamp configure-stamp
51 # Add here commands to clean up after the build process.
53 rm -f debian/cl-uffi.postinst.* debian/cl-uffi.prerm.*
63 # Add here commands to install the package into debian/uffi.
64 $(INSTALL) $(INSTALLDIRFLAGS) $(clc-source)
65 $(INSTALL) $(INSTALLDIRFLAGS) $(clc-source)/mcl
66 $(INSTALL) $(INSTALLFLAGS) $(shell echo src/*.cl *.system) $(clc-source)
67 dh_link -p $(pkg) $(clc-source) $(SOURCEDIR)
69 $(INSTALL) $(INSTALLFLAGS) $(shell echo src/mcl/*.cl) $(clc-source)/mcl
70 $(INSTALL) $(INSTALLFLAGS) doc/html/* $(DOCDIR)/html
71 cp doc/uffi.pdf doc/cl-uffi.pdf
72 rm -f doc/cl-uffi.pdf.gz
74 $(INSTALL) $(INSTALLFLAGS) doc/cl-uffi.pdf.gz $(DOCDIR)
75 rm -f doc/cl-uffi.pdf.gz
77 # Build architecture-independent files here.
78 binary-indep: build install
81 # Build architecture-dependent files here.
82 binary-arch: build install
87 dh_installexamples examples/*.cl
98 dh_installchangelogs ChangeLog
110 binary: binary-indep binary-arch
111 .PHONY: build clean binary-indep binary-arch binary install configure