r2150: *** 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 pkg-ver         := $(debpkg)-$(UPSTREAM_VER)
25 clc-source      := $(SOURCEDIR)-$(UPSTREAM_VER)
26
27 configure: configure-stamp
28 configure-stamp:
29         dh_testdir
30         # Add here commands to configure the package.
31
32         touch configure-stamp
33
34
35 build: build-stamp
36
37 build-stamp: configure-stamp 
38         dh_testdir
39
40         # Add here commands to compile the package.
41         # Make doc isn't necessary because the docs are in the upstream version
42         # $(MAKE) doc
43
44         touch build-stamp
45
46 clean:
47         dh_testdir
48         dh_testroot
49         rm -f build-stamp configure-stamp
50
51         # Add here commands to clean up after the build process.
52         -$(MAKE) clean
53         rm -f debian/cl-uffi.postinst.* debian/cl-uffi.prerm.*
54
55         dh_clean
56
57 install: build
58         dh_testdir
59         dh_testroot
60         dh_clean -k
61         dh_installdirs
62
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)
68
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
73         gzip doc/cl-uffi.pdf
74         $(INSTALL) $(INSTALLFLAGS) doc/cl-uffi.pdf.gz $(DOCDIR)
75         rm -f doc/cl-uffi.pdf.gz
76
77 # Build architecture-independent files here.
78 binary-indep: build install
79
80
81 # Build architecture-dependent files here.
82 binary-arch: build install
83         dh_testdir
84         dh_testroot
85 #       dh_installdebconf       
86         dh_installdocs
87         dh_installexamples examples/*.cl
88 #       dh_installmenu
89 #       dh_installlogrotate
90 #       dh_installemacsen
91 #       dh_installpam
92 #       dh_installmime
93 #       dh_installinit
94 #       dh_installcron
95 #       dh_installman
96 #       dh_installinfo
97 #       dh_undocumented
98         dh_installchangelogs ChangeLog
99         dh_strip
100         dh_compress
101         dh_fixperms
102 #       dh_makeshlibs
103         dh_installdeb
104 #       dh_perl
105         dh_shlibdeps
106         dh_gencontrol
107         dh_md5sums
108         dh_builddeb
109
110 binary: binary-indep binary-arch
111 .PHONY: build clean binary-indep binary-arch binary install configure
112