Sophie

Sophie

distrib > Mandriva > 2010.0 > i586 > media > contrib-release > by-pkgid > dca483b59ba61f3fa092de932ddd570e > files > 111

nuface-2.0.14-2mdv2009.1.i586.rpm

#!/usr/bin/make -f
# -*- makefile -*-
# Sample debian/rules that uses debhelper.
# This file was originally written by Joey Hess and Craig Small.
# As a special exception, when this file is copied by dh-make into a
# dh-make output file, you may use that output file without restriction.
# This special exception was added by Craig Small in version 0.37 of dh-make.

# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1





configure: configure-stamp
configure-stamp:
	dh_testdir
	# Add here commands to configure the package.

	touch configure-stamp


build: build-stamp

build-stamp: configure-stamp 
	dh_testdir

	# Add here commands to compile the package.
	#cd doc; make; cd ..
	#docbook-to-man debian/nuface.sgml > nuface.1
	#cd scripts; python2.3 setup_nupyf.py build; cd ..
	$(MAKE)
	touch build-stamp

clean:
	dh_testdir
	dh_testroot
	rm -f build-stamp configure-stamp

	# Add here commands to clean up after the build process.
	find doc/ -type l -delete
	$(MAKE) clean
	rm -rf scripts/build

	dh_clean 

install: build
	dh_testdir
	dh_testroot
	dh_clean -k 
	dh_installdirs

	# Add here commands to install the package into debian/nuface.
	$(MAKE) install DESTDIR=$(CURDIR)/debian/nuface APACHE_USER=www-data
	#install -o 0 -g 0 -m 0644 *.php *.css *.png *.gif $(CURDIR)/debian/nuface/usr/share/edenwall-web/nuface/
	install -o 0 -g 0 -m 0644 doc/nuface/en/index.html $(CURDIR)/debian/nuface/usr/share/doc/nuface/html/en
	install -o 0 -g 0 -m 0644 doc/nuface/fr/index.html $(CURDIR)/debian/nuface/usr/share/doc/nuface/html/fr
	#install -o 0 -g 0 -m 0644 include/footer.php  include/function.php  include/headers.php  include/messages.php  include/security.php  \
	    #include/types.php $(CURDIR)/debian/nuface/usr/share/edenwall-web/nuface/include
	#install -o 0 -g 0 -m 0644 include/config.php  $(CURDIR)/debian/nuface/etc/nuface
	install -o 0 -g 0 -m 0644 doc/ck-style.css $(CURDIR)/debian/nuface/usr/share/doc/nuface/html
	(cd $(CURDIR)/debian/nuface/usr/share/doc/nuface/html/fr; rm ck-style.css||/bin/true ;ln -s ../ck-style.css)
	(cd $(CURDIR)/debian/nuface/usr/share/doc/nuface/html/en; rm ck-style.css||/bin/true ;ln -s ../ck-style.css)
											
	#install -o 0 -g 0 -m 0644 scripts/nupyf/run_nupyf debian/nuface/usr/sbin/nupyf
	#rm -f $(CURDIR)/debian/nuface/etc/network/firewall/dyn
	#rm -f $(CURDIR)/debian/nuface/etc/network/firewall/desc/*.ex
	cp scripts/init-firewall debian/nuface.init-firewall.init
	cp -p scripts/pre-init-firewall debian/nuface.pre-init-firewall.init
	#cd scripts; python2.3 setup_nupyf.py install --prefix=$(shell pwd)/debian/nuface/usr

	find $(CURDIR)/debian/nuface/usr/lib -name "*.pyc" -exec rm -f {} \;
	# make python scripts executable
	for i in `find debian -mindepth 3 -type f`; do \
	  case $$i in \
	    *.py) \
	      if head -n 1 $$i | grep -q -s "#!"; then \
	        chmod 755 $$i; \
	      fi; \
	      ;; \
	   esac \
	done

	rm -f $(CURDIR)/debian/nuface/usr/share/edenwall-web/nuface/include/config.php
	sed -i 's|from /.*default_config.php|from /usr/share/edenwall-web/nuface/include/default_config.php|' $(CURDIR)/debian/nuface/etc/nuface/config.php

	ln -snf /var/lib/nuface $(CURDIR)/debian/nuface/etc/network/firewall
	
# Build architecture-dependent files here.
binary-arch: build install
# We have nothing to do by default.

# Build architecture-independent files here.
binary-indep: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs Changelog
	dh_installdocs
	dh_installexamples
	sed -i 's|/etc/[^/]\+/apache_users|/etc/nuface/apache_users|' $(CURDIR)/debian/nuface/usr/share/doc/nuface/nuface_apache.conf
	dh_install
	dh_link
#	dh_installmenu
#	dh_installdebconf	
#	dh_installlogrotate
#	dh_installemacsen
#	dh_installpam
#	dh_installmime
	dh_installinit --name init-firewall --no-start --no-restart-on-upgrade
	dh_installinit --name pre-init-firewall --no-start --no-restart-on-upgrade -- start 39 S .
#	dh_installcron
#	dh_installinfo
	dh_installman doc/nupyf.8
	dh_installman doc/nulayer7.8
	dh_installman doc/checkdesc.8
	# remove extra license files
	rm -f $(CURDIR)/debian/nuface/usr/share/edenwall-web/nuface/js/toolman/LICENSE.txt
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
#	dh_perl
	dh_python
#	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps
	dh_gencontrol
	dh_md5sums
	dh_builddeb

binary: binary-indep binary-arch
.PHONY: build clean binary-indep binary-arch binary install configure