LogoopenSUSE Build Service > Projects
Sign Up | Log In

View File debian.rules of Package xchroot (Project home:estellnb:elstel)

#!/usr/bin/make -f
#tar -xzf %{source1}

VERSION := 2.3.2
SOURCE0 := ../SOURCES/xchroot-v$(VERSION)
SOURCE1 := ../SOURCES/xchroot-doc-2013-10-28.tar.gz
SOURCE2 := ../SOURCES/xchroot.8
INST_DIR := $(CURDIR)/debian/tmp
MAN_DIR := /usr/share/man
DOC_DIR := /usr/share/doc


configure:

build:
	chmod +x $(SOURCE0)
	$(SOURCE0) --license >debian/copyright
	sed -n '2,/^$$/p' <$(SOURCE0) | sed 's/^#//' >ChangeLog
	tar -xvzf $(SOURCE1)
	cd www.elstel.org; mv auxil/* xchroot/; sed -i 's#/auxil/##' xchroot/*.html; cd -
	sed "s#/usr/share/doc\[/packages\]/xchroot#$(DOC_DIR)/xchroot#" $(SOURCE2) | gzip -c >xchroot.8.gz

install:
	mkdir -p $(INST_DIR)/usr/sbin
	install $(SOURCE0) $(INST_DIR)/usr/sbin/xchroot
	mkdir -p $(INST_DIR)$(MAN_DIR)/man8/
	install -m 0644 xchroot.8.gz $(INST_DIR)$(MAN_DIR)/man8/

	mkdir -p $(INST_DIR)$(DOC_DIR)/xchroot
	cd www.elstel.org/xchroot; install * $(INST_DIR)$(DOC_DIR)/xchroot; cd -

binary: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs ChangeLog
	dh_fixperms
	dh_installman
	dh_installdocs
	dh_installdeb
	dh_md5sums
	dh_gencontrol
	dh_builddeb

clean:
	dh_testdir
	dh_testroot
	rm -f xchroot.8.gz ChangeLog
	rm -fr www.elstel.org
	dh_clean