]> git.proxmox.com Git - mirror_smartmontools-debian.git/blobdiff - debian/rules
Import patch from Helmut, #794035
[mirror_smartmontools-debian.git] / debian / rules
index 93475a5599b20cd4aed707816496f06571fa223d..2aae688e65f25bd28d5193b305cc7a097538992a 100755 (executable)
@@ -5,10 +5,12 @@
 # Uncomment this to turn on verbose mode.
 #export DH_VERBOSE=1
 
-export DEB_BUILD_HARDENING=1
+export DEB_BUILD_MAINT_OPTIONS = hardening=+all
+DPKG_EXPORT_BUILDFLAGS = 1
+include /usr/share/dpkg/buildflags.mk
 
-DEB_BUILD_ARCH_OS  ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_OS)
-DEB_BUILD_ARCH_CPU ?= $(shell dpkg-architecture -qDEB_BUILD_ARCH_CPU)
+DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE)
+DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE)
 
 ifeq ($(DEB_HOST_ARCH_OS),linux)
        CONFIGURE_ARGS += --with-selinux
@@ -34,12 +36,14 @@ PACKAGE = smartmontools
 SRC_VERSION := $(shell dpkg-parsechangelog | sed -ne 's/^Version: \(.*\)-.*/\1/p'| cut -d':' -f2)
 SVN_REVISION := $(shell echo $(SRC_VERSION) | awk -F"+" '{ print $$2 }' | sed 's/svn//' )
 TARBALL = $(PACKAGE)_$(SRC_VERSION).orig.tar.gz
+SVN_ROOT := 'https://svn.code.sf.net/p/smartmontools/code/trunk/smartmontools'
 
 get-orig-source:
                rm -rf get-orig-source $(TARBALL)
                mkdir get-orig-source
-               svn export -r $(SVN_REVISION) https://smartmontools.svn.sourceforge.net/svnroot/smartmontools/trunk/smartmontools/ \
+               svn export -r $(SVN_REVISION) $(SVN_ROOT) \
                        get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig
+               rm -rf get-orig-source/$(PACKAGE)-$(SRC_VERSION).orig/os_solaris_ata.s
                GZIP=--best tar czf $(TARBALL) -C get-orig-source $(PACKAGE)-$(SRC_VERSION).orig
                rm -rf get-orig-source
                echo "  "$(TARBALL)" created; move it to the right destination to build the package"
@@ -49,6 +53,8 @@ configure-stamp:
        dh_testdir
        ./autogen.sh
        CFLAGS="${CFLAGS}" CXXFLAGS="${CFLAGS}" ./configure --prefix=/usr                \
+                               --build=$(DEB_BUILD_GNU_TYPE) \
+                               --host=$(DEB_HOST_GNU_TYPE) \
                                --sysconfdir=/etc                \
                                --mandir=/usr/share/man          \
                                --with-initscriptdir=no \
@@ -61,6 +67,9 @@ configure-stamp:
                                --with-exampledir=/usr/share/doc/smartmontools/examples/ \
                                --with-drivedbdir=/var/lib/smartmontools/drivedb \
                                --with-systemdsystemunitdir=/lib/systemd/system \
+                               --with-smartdscriptdir=/usr/share/smartmontools \
+                               --with-smartdplugindir=/etc/smartmontools/smartd_warning.d \
+                               --with-systemdenvfile=/etc/default/smartmontools \
                                ${CONFIGURE_ARGS}
        touch configure-stamp
 
@@ -89,8 +98,6 @@ install: build
        dh_prep
        dh_installdirs
        $(MAKE) DESTDIR=$(CURDIR)/debian/smartmontools install
-       install -D -m 755 debian/smartmontools-bug \
-               $(CURDIR)/debian/smartmontools/usr/share/bug/smartmontools
 
 # Build architecture-independent files here.
 binary-indep: