Fixed charset handling of the filenames.
[captive.git] / debian / rules
index 58d0322..e0cc48e 100755 (executable)
 # This is the debhelper compatibility version to use.
 export DH_COMPAT=3
 
+# This has to be exported to make some magic below work.
+export DH_OPTIONS
+
+ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
+OPTFLAGS := -O2
+else
+OPTFLAGS := -O0
+endif
+
 # These are used for cross-compiling and for saving the configure script
 # from having to guess our platform (since we know it already)
 DEB_HOST_GNU_TYPE   ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
@@ -35,12 +44,9 @@ ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
        INSTALL_PROGRAM += -s
 endif
 
-# FIXME: Use our own CFLAGS to prevent '-mcpu=i686' which up to gcc-20030214 gcc
-# will ignore stack freeing of attribute((stdcall)) callees in caller functions code.
-# Check at the final call of src/libcaptive/reactos/ntoskrnl/io/irp.c/IofCallDriver().
 config.status: configure
        dh_testdir
-       CFLAGS="-O2" ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
+       ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var \
                --enable-shared --disable-static \
                --with-readline \
                --disable-bug-replay \
@@ -52,7 +58,8 @@ config.status: configure
                --enable-man-pages \
                --enable-sbin-mountdir=/sbin \
                --enable-sbin-mount-fs=ntfs:fastfat:cdfs:ext2fsd \
-               --disable-gtk-doc
+               --disable-gtk-doc \
+               --with-orbit-line=link
 
 build-arch:  config.status build-arch-stamp
 build-arch-stamp:
@@ -79,7 +86,10 @@ install: build
        dh_movefiles
        #FIXME: dh_movefiles(1) ignores any directories
        #       and dh_installdirs(1) creates them in debian/tmp/
-       mkdir -p $(CURDIR)/debian/captive/var/lib/captive
+       mkdir -p   $(CURDIR)/debian/captive/var/lib/captive
+       chmod  755 $(CURDIR)/debian/captive/var/lib/captive
+       mkdir -p   $(CURDIR)/debian/captive/var/lib/captive/tmp
+       chmod 1777 $(CURDIR)/debian/captive/var/lib/captive/tmp
 
 # Build architecture-dependent files here.
 binary-arch: build install
@@ -92,7 +102,7 @@ binary-arch: build install
 #      dh_installchangelogs ChangeLog -a
        dh_link -a
        dh_compress -a
-       dh_fixperms -a
+       dh_fixperms -a -X/usr/sbin/captive-sandbox-server -X/var/lib/captive/tmp
        dh_makeshlibs -a
        dh_installdeb -a
        # FIXME: warning: could not find path for libcaptive-0.9cvs.so