r2145: *** empty log message ***
[uffi.git] / debian / rules
1 #!/usr/bin/make -f
2 # Sample debian/rules that uses debhelper.
3 # GNU copyright 1997 to 1999 by Joey Hess.
4
5 # Uncomment this to turn on verbose mode.
6 # export DH_VERBOSE=1
7
8 # This is the debhelper compatibility version to use.
9 export DH_COMPAT=4
10
11 pkg     := uffi
12 debpkg  := cl-uffi
13 prefix  := debian/$(debpkg)
14
15 INSTALL := install
16 INSTALLFLAGS    := -g root -o root -m 0644
17 INSTALLDIRFLAGS := -d -g root -o root -m 0755
18
19 SOURCEDIR       := $(prefix)/usr/share/common-lisp/source/${pkg}
20 DOCDIR          := $(prefix)/usr/share/doc/${debpkg}
21
22 UPSTREAM_VER    := $(shell sed -n -e "s/${DEBPKG} (\(.*\)-[0-9.]).*/\1/p" < debian/changelog |head -1)
23
24 clc-source:     := $(SOURCEDIR)-$(UPSTREAM_VER)
25
26 configure: configure-stamp
27 configure-stamp:
28         dh_testdir
29         # Add here commands to configure the package.
30
31         touch configure-stamp
32
33
34 build: build-stamp
35
36 build-stamp: configure-stamp 
37         dh_testdir
38
39         # Add here commands to compile the package.
40         # Make doc isn't necessary because the docs are in the upstream version
41         # $(MAKE) doc
42
43         touch build-stamp
44
45 clean:
46         dh_testdir
47         dh_testroot
48         rm -f build-stamp configure-stamp
49
50         # Add here commands to clean up after the build process.
51         -$(MAKE) clean
52         rm -f debian/cl-uffi.postinst.* debian/cl-uffi.prerm.*
53
54         dh_clean
55
56 install: build
57         dh_testdir
58         dh_testroot
59         dh_clean -k
60         dh_installdirs
61
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
68         gzip doc/cl-uffi.pdf
69         $(INSTALL) $(INSTALLFLAGS) doc/cl-uffi.pdf.gz $(DOCDIR)
70         rm -f doc/cl-uffi.pdf.gz
71
72 # Build architecture-independent files here.
73 binary-indep: build install
74
75
76 # Build architecture-dependent files here.
77 binary-arch: build install
78         dh_testdir
79         dh_testroot
80 #       dh_installdebconf       
81         dh_installdocs
82         dh_installexamples examples/*.cl
83 #       dh_installmenu
84 #       dh_installlogrotate
85 #       dh_installemacsen
86 #       dh_installpam
87 #       dh_installmime
88 #       dh_installinit
89 #       dh_installcron
90 #       dh_installman
91 #       dh_installinfo
92 #       dh_undocumented
93         dh_installchangelogs ChangeLog
94         dh_link $(clc-source) $(SOURCEDIR)
95         dh_strip
96         dh_compress
97         dh_fixperms
98 #       dh_makeshlibs
99         dh_installdeb
100 #       dh_perl
101         dh_shlibdeps
102         dh_gencontrol
103         dh_md5sums
104         dh_builddeb
105
106 binary: binary-indep binary-arch
107 .PHONY: build clean binary-indep binary-arch binary install configure
108