r4699: *** empty log message ***
[uffi.git] / debian / rules
1 #!/usr/bin/make -f
2
3 pkg             := uffi
4 pkg-tests       := $(pkg)-tests 
5 debpkg          := cl-$(pkg)
6 debpkg-tests    := $(debpkg)-tests
7
8
9 clc-source      := usr/share/common-lisp/source
10 clc-systems     := usr/share/common-lisp/systems
11 clc-files       := $(clc-source)/$(pkg)
12 clc-tests       := $(clc-source)/$(pkg-tests)
13 doc-dir         := usr/share/doc/$(debpkg)
14 lib-dir         := usr/lib
15
16 configure: configure-stamp
17 configure-stamp:
18         dh_testdir
19         # Add here commands to configure the package.
20         touch configure-stamp
21
22
23 build: build-stamp
24
25 build-stamp: configure-stamp 
26         dh_testdir
27         # Add here commands to compile the package.
28         (cd examples; make linux)
29         touch build-stamp
30
31 clean:
32         dh_testdir
33         dh_testroot
34         rm -f build-stamp configure-stamp
35         # Add here commands to clean up after the build process.
36         -$(MAKE) clean
37         cd examples
38         make clean
39         rm -f debian/$(debpkg).postinst.* debian/$(debpkg).prerm.*
40         dh_clean
41
42 install: build
43         dh_testdir
44         dh_testroot
45         dh_clean -k
46         dh_installdirs --all $(clc-systems) $(clc-source) 
47         dh_installdirs -p $(debpkg) $(doc-dir) $(clc-files)/src
48
49         # Add here commands to install the package into debian/uffi.
50         dh_install $(pkg).asd $(clc-files)
51         dh_install "src/*.lisp" $(clc-files)/src
52         dh_link $(clc-files)/$(pkg).asd $(clc-systems)/$(pkg).asd
53
54         dh_installdirs -p $(debpkg-tests) $(clc-tests)/tests $(lib-dir)
55         dh_install $(debpkg-tests) $(pkg-tests).asd $(clc-tests)
56         dh_install $(debpkg-tests) "examples/*.lisp" $(clc-tests)/tests
57         dh_install $(debpkg-tests) "examples/c-test-fns.so" $(lib-dir)
58         dh_link $(debpkg-tests) $(clc-tests)/$(pkg-tests).asd $(clc-systems)/$(clc-tests).$(pkg-tests)asd
59
60         rm -rf doc/html
61         (cd doc; tar xzf html.tar.gz; cd ..)
62         dh_install doc/html $(doc-dir)
63         rm -rf doc/html
64         cp doc/uffi.pdf doc/cl-uffi.pdf
65         gzip -9 doc/cl-uffi.pdf
66         dh_install doc/cl-uffi.pdf.gz $(doc-dir)
67
68 # Build architecture-independent files here.
69 binary-indep: build install
70
71
72 # Build architecture-dependent files here.
73 binary-arch: build install
74         dh_testdir
75         dh_testroot
76 #       dh_installdebconf       
77         dh_installdocs
78         dh_installexamples examples/*.lisp
79 #       dh_installmenu
80 #       dh_installlogrotate
81 #       dh_installemacsen
82 #       dh_installpam
83 #       dh_installmime
84 #       dh_installinit
85 #       dh_installcron
86 #       dh_installman
87 #       dh_installinfo
88 #       dh_undocumented
89         dh_installchangelogs ChangeLog
90         dh_strip
91         dh_compress
92         dh_fixperms
93 #       dh_makeshlibs
94         dh_installdeb
95 #       dh_perl
96         dh_shlibdeps
97         dh_gencontrol
98         dh_md5sums
99         dh_builddeb
100
101 binary: binary-indep binary-arch
102 .PHONY: build clean binary-indep binary-arch binary install configure
103