File debian.rules of Package glusterfs

#!/usr/bin/make -f
# -*- makefile -*-

CFLAGS = -Wall -g

SCONS_OPTIONS = CC="gcc" \
	CXX="g++" \
	INSTALL_PREFIX=/usr \
	WITH_DOC_BUILD=0 \
	WITH_DOC_INSTALL=1
SCONS= scons $(SCONS_OPTIONS)

ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
	CFLAGS += -O0
else
	CFLAGS += -O2
endif

ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
	INSTALL_PROGRAM += -s
endif

# shared library versions, option 1
major=0

INSTALLROOT=$(CURDIR)/debian/ascend/
DATADIR=$(INSTALLROOT)/usr/share

GTKSOURCEVIEWLANGS=$(DATADIR)/gtksourceview-1.0/language-specs

build: build-stamp
build-stamp:
	dh_testdir
	cd $(CURDIR) && $(SCONS) libascend tcltk pygtk models
	touch build-stamp

clean:
	dh_testdir
	rm -f build-stamp
	dh_clean 
	$(SCONS) -c
	rm -rf .scon*
	rm scons/*.pyc

install: build
	dh_testdir
#	dh_testroot
	dh_clean -k 
	dh_installdirs
	mkdir -p $(INSTALLROOT)/usr
	cd $(CURDIR) && $(SCONS) INSTALL_ROOT=$(INSTALLROOT) install
#
	cd $(CURDIR)/pygtk/gnome && \
	install -m 644 -D ascend.desktop $(DATADIR)/applications/ascend.desktop && \
	install -m 644 -D ascend.png $(DATADIR)/icons/ascend-app.png && \
	install -m 644 -D ascend.png $(DATADIR)/icons/hicolor/64x64/ascend.png && \
	install -m 644 -D ascend.xml $(DATADIR)/mime/packages/ascend.xml
#
# file-type icon for ascend models (double click should open in ASCEND)
	cd $(CURDIR)/pygtk/glade && \
	install -m 644 -D ascend-doc-48x48.svg $(DATADIR)/icons/text-x-ascend-model.svg
#
# syntax highlighting for gedit
	cd $(CURDIR)/tools/gedit && \
	install -m 644 -D ascend.lang $(GTKSOURCEVIEWLANGS)/ascend.lang
#
	dh_install --autodest
	dh_desktop
	dh_installman debian/ascend.man 
	dh_installman debian/ascend4.man 
	dh_installman debian/ascend-config.man 

# Build architecture-independent files here.
binary-indep:
	dh_testdir
	dh_testroot
	-cd $(CUR_DIR) && $(SCONS) doc	

# Build architecture-dependent files here.
binary-arch: build install
	dh_testdir
	dh_testroot
	dh_installchangelogs CHANGELOG.txt
	dh_installdocs
	dh_installexamples
	dh_installman
	dh_link
	dh_strip
	dh_compress
	dh_fixperms
	dh_makeshlibs
	dh_installdeb
	dh_shlibdeps -L ascend -l debian/ascend/usr/lib
	dh_gencontrol
	dh_md5sums
	dh_builddeb

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


openSUSE Build Service is sponsored by