r11710: fix build-twice-in-a-row
[uffi.git] / debian / rules
index a96513c130bf4a17643be4d7b5702ac1a03d1731..3b3bb574950d04572b7dc1cc6c0c81ce5a5b6d8f 100755 (executable)
@@ -11,7 +11,7 @@ clc-systems   := usr/share/common-lisp/systems
 clc-files      := $(clc-source)/$(pkg)
 clc-tests      := $(clc-source)/$(pkg-tests)
 doc-dir                := usr/share/doc/$(debpkg)
-lib-dir                := usr/lib
+lib-dir                := usr/lib/uffi
 
 configure: configure-stamp
 configure-stamp:
@@ -25,7 +25,7 @@ build: build-stamp
 build-stamp: configure-stamp 
        dh_testdir
        # Add here commands to compile the package.
-       (cd tests; make linux)
+       (cd tests; make)
        touch build-stamp
 
 clean:
@@ -36,6 +36,7 @@ clean:
        -$(MAKE) clean
        (cd tests; make clean)
        rm -f debian/$(debpkg).postinst.* debian/$(debpkg).prerm.*
+       rm -f doc/cl-uffi.pdf.gz
        dh_clean
 
 install: build
@@ -55,13 +56,14 @@ install: build
        dh_install doc/html $(doc-dir)
        rm -rf doc/html
        cp doc/uffi.pdf doc/cl-uffi.pdf
+       rm -f doc/cl-uffi.pdf.gz # ensure file not present before making gz
        gzip -9 doc/cl-uffi.pdf
        dh_install doc/cl-uffi.pdf.gz $(doc-dir)
 
        dh_installdirs -p $(debpkg-tests) $(clc-tests)/tests $(lib-dir)
        dh_install -p $(debpkg-tests) $(pkg-tests).asd $(clc-tests)
-       dh_install -p $(debpkg-tests) "tests/*.lisp" $(clc-tests)/tests
-       dh_install -p $(debpkg-tests) "tests/uffi-c-test-lib.so" $(lib-dir)
+       dh_install -p $(debpkg-tests) tests/*.lisp tests/*.c $(clc-tests)/tests
+       dh_install -p $(debpkg-tests) tests/*.so $(lib-dir)
        dh_link -p $(debpkg-tests) $(clc-tests)/$(pkg-tests).asd $(clc-systems)/$(pkg-tests).asd
 
 # Build architecture-independent files here.