[Pkg-ossec-devel] [SCM] Git repository for pkg-ossec branch, master, updated. 5840c90d320d3cd7ec7f95f3d57448a4a9e3cd28

Jose Antonio Quevedo joseantonio.quevedo at gmail.com
Fri Jul 22 12:04:03 UTC 2011


The following commit has been merged in the master branch:
commit 592ef1e9aa0e0a92d1013ce35d22ef99c2faec53
Author: Jose Antonio Quevedo <joseantonio.quevedo at gmail.com>
Date:   Fri Jul 22 14:04:05 2011 +0200

    Tons of changes made at debian/rules.

diff --git a/debian/rules b/debian/rules
index 88572b1..7ef9a51 100755
--- a/debian/rules
+++ b/debian/rules
@@ -16,43 +16,106 @@ export DH_VERBOSE=1
 # This has to be exported to make some magic below work.
 export DH_OPTIONS
 
+PKG_BASENAME=ossec-hids
+CURDIR=$(shell pwd)
 
-clean:
 
-build:
+configure-stamp:
+	dh_testdir
 
-	USER_LANGUAGE = en
+
+	touch configure-stamp
+
+configure-%: configure-stamp
+
+	USER_LANGUAGE = en	# Here we have to choose if autodetect or ask to the user. First choice preferred.
 	USER_NO_STOP = no
 #	USER_UPDATE = 
-	USER_INSTALL_TYPE = server #( agent || local || server )
 
 	BUILD = yes	# variable used to stop the installation script
 
-	./install
 
-install: install-doc install-server install-client install-local
 
+configure-local:
+
+	USER_INSTALL_TYPE = local
+
+configure-server:
+
+	USER_INSTALL_TYPE = server
+
+configure-agent:
+
+	USER_INSTALL_TYPE = agent
+
+
+build-stamp:
+
+	dh_testdir
+	touch build-stamp
+
+build: build-stamp build-local build-server build-agent
+
+
+build-local: configure-local
+
+	USER_INSTALL_TYPE="$USER_INSTALL_TYPE" BUILD="$BUILD" USER_LANGUAGE="$USER_LANGUAGE" USER_NO_STOP="no" ./install
+
+build-server: configure-server
+
+	USER_INSTALL_TYPE="$USER_INSTALL_TYPE" BUILD="$BUILD" USER_LANGUAGE="$USER_LANGUAGE" USER_NO_STOP="no" ./install
+
+build-agent: configure-agent
+
+	USER_INSTALL_TYPE="$USER_INSTALL_TYPE" BUILD="$BUILD" USER_LANGUAGE="$USER_LANGUAGE" USER_NO_STOP="no" ./install
+
+install: build install-doc install-server install-agent install-local
 
-	./install
 
 install-%:
 
+	dh_testdir
+	dh_testroot
+	dh_prep
+	dh_installdirs
+
 	USER_LANGUAGE = en
 	USER_NO_STOP = no
 #	USER_UPDATE = 
 	BUILD = no
 
+	DESTDIR = $CURDIR/debian
+
+
 
 install-doc:
 
+	PKG=$PKG_BASENAME-doc
+	DESTDIR = $DESTDIR/$PKG
+
+	# This target needs to be done
+
+install-local:
+
+	PKG=$PKG_BASENAME-local
+	INSTALLDIR = $DESTDIR/$PKG
+
+	USER_INSTALL_TYPE="$USER_INSTALL_TYPE" BUILD="$BUILD" USER_LANGUAGE="$USER_LANGUAGE" USER_NO_STOP="no" ./install
+
+
 install-server:
-	USER_INSTALL_TYPE = server
+
+	PKG=$PKG_BASENAME-server
+	INSTALLDIR = $DESTDIR/$PKG
+
+	USER_INSTALL_TYPE="$USER_INSTALL_TYPE" BUILD="$BUILD" USER_LANGUAGE="$USER_LANGUAGE" USER_NO_STOP="no" ./install
 
 install-client:
-	USER_INSTALL_TYPE = agent
 
-install-local:
-	USER_INSTALL_TYPE = local
+	PKG=$PKG_BASENAME-client
+	INSTALLDIR = $DESTDIR/$PKG
+
+	USER_INSTALL_TYPE="$USER_INSTALL_TYPE" BUILD="$BUILD" USER_LANGUAGE="$USER_LANGUAGE" USER_NO_STOP="no" ./install
 
 binary:
 
@@ -62,5 +125,32 @@ binary-indep:
 
 get-orig-source:
 
+
+clean-doc:		## are we really needing clean-* targets? ---> we already have dh_clean at clean target
+
+	$(MAKE) clean-doc
+
+clean-local:
+
+	$(MAKE) clean-local
+
+clean-server:
+
+	$(MAKE) clean-server
+
+clean-client:
+
+	$(MAKE) clean-client
+
+clean: #clean-local clean-server clean-client clean-doc
+
+	dh_testdir
+	dh_testroot
+
+#	rm -f build-stamp configure-stamp	#  <-- already done by dh_clean, so don't needed
+
+
+	dh_clean
+
 #%:
 #	dh $@ 

-- 
Git repository for pkg-ossec



More information about the Pkg-ossec-devel mailing list