3 # Sample debian/rules that uses debhelper.
4 # GNU copyright 1997 to 1999 by Joey Hess.
6 # Uncomment this to turn on verbose mode.
9 # Include dpatch stuff.
10 include /usr/share/dpatch/dpatch.make
13 MAKE_FLAGS = messages=yes OPTFLAG=-O0
15 GNUSTEP_SETUP=/usr/lib/opengroupware.org/System/Library/Makefiles/GNUstep.sh
20 ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS)))
25 ifeq (,$(findstring nostrip,$(DEB_BUILD_OPTIONS)))
29 controlfiles: controlfiles-stamp
30 controlfiles-stamp: debian/rules clean-controlfiles
31 for f in debian/*_SOPEVER_*; do \
32 newname=$$(echo $$f | sed s/_SOPEVER_/$(SOPEVER)/ ); \
34 echo $$newname >> controlfiles.tmp; \
36 for f in debian/*_GNUSTEPDBVER_*; do \
37 newname=$$(echo $$f | sed s/_GNUSTEPDBVER_/$(GNUSTEPDBVER)/ ); \
39 echo $$newname >> controlfiles.tmp; \
42 mv controlfiles.tmp controlfiles-stamp
45 if [ -f controlfiles-stamp ]; then \
46 for f in $$(cat controlfiles-stamp); do \
49 rm controlfiles-stamp; \
51 if [ -f controlfiles.tmp ]; then \
52 for f in $$(cat controlfiles-stamp); do \
55 rm controlfiles.tmp; \
58 debian/control: debian/control.in debian/rules
59 sed -e s/_SOPEVER_/$(SOPEVER)/g -e s/_GNUSTEPDBVER_/$(GNUSTEPDBVER)/g < debian/control.in > debian/control
61 build: build-stamp debian/control controlfiles
62 build-stamp: patch-stamp
65 -mv sope-core/NGStreams/config.guess sope-core/NGStreams/config.guess.upstream
66 -mv sope-core/NGStreams/config.sub sope-core/NGStreams/config.sub.upstream
67 ln -s /usr/share/automake/config.guess sope-core/NGStreams/config.guess
68 ln -s /usr/share/automake/config.sub sope-core/NGStreams/config.sub
70 CFLAGS="$(CFLAGS)" . $(GNUSTEP_SETUP); \
71 $(MAKE) $(MAKE_FLAGS) all
73 CFLAGS="$(CFLGAS)" . $(GNUSTEP_SETUP); \
74 $(MAKE) $(MAKE_FLAGS) -C sope-appserver/mod_ngobjweb all
78 clean: unpatch clean-controlfiles
84 -rm sope-core/NGStreams/config.guess
85 -rm sope-core/NGStreams/config.sub
86 -mv sope-core/NGStreams/config.guess.upstream sope-core/NGStreams/config.guess
87 -mv sope-core/NGStreams/config.sub.upstream sope-core/NGStreams/config.sub
89 -. $(GNUSTEP_SETUP); $(MAKE) -C sope-appserver/mod_ngobjweb clean
90 -. $(GNUSTEP_SETUP); $(MAKE) -C sope-appserver/mod_ngobjweb distclean
92 -. $(GNUSTEP_SETUP); $(MAKE) clean
93 -. $(GNUSTEP_SETUP); $(MAKE) distclean
103 # Add here commands to install the package into debian/tmp
104 CFLAGS="$(CFLAGS)" . $(GNUSTEP_SETUP); \
105 $(MAKE) $(MAKE_FLAGS) install \
106 GNUSTEP_INSTALLATION_DIR=$(CURDIR)/debian/tmp/$$GNUSTEP_SYSTEM_ROOT\
107 INSTALL_ROOT_DIR=$(CURDIR)/debian/tmp\
108 FHS_INSTALL_ROOT=$(CURDIR)/debian/tmp/usr
110 CFLAGS="$(CFLGAS)" . $(GNUSTEP_SETUP); \
111 $(MAKE) $(MAKE_FLAGS) -C sope-appserver/mod_ngobjweb install \
112 GNUSTEP_INSTALLATION_DIR=$(CURDIR)/debian/tmp/usr/lib/apache/1.3
114 install -m 644 debian/500mod_ngobjweb.info $(CURDIR)/debian/libapache-mod-ngobjweb/usr/lib/apache/1.3
115 install -m 644 debian/mod_ngobjweb.conf $(CURDIR)/debian/libapache-mod-ngobjweb/usr/share/opengroupware.org/mod_ngobjweb
117 # Build architecture-independent files here.
118 binary-indep: build install
119 # We have nothing to do by default.
121 # Build architecture-dependent files here.
122 binary-arch: build install
128 dh_install --sourcedir=debian/tmp
131 # dh_installlogrotate
147 dh_shlibdeps -L libsope-appserver$(SOPEVER) -L libsope-xml$(SOPEVER) -L libsope-mime$(SOPEVER) \
148 -L libsope-ical$(SOPEVER) -L libsope-ldap$(SOPEVER) -L libsope-gnustep-db$(GNUSTEPDBVER) \
149 -l debian/tmp/usr/lib
154 binary: binary-indep binary-arch
155 .PHONY: build clean binary-indep binary-arch binary install configure