2008-11-24 17:21:36 -06:00
|
|
|
#!/usr/bin/make -f
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
2008-11-26 15:25:42 -06:00
|
|
|
export DH_VERBOSE=1
|
2008-11-24 17:21:36 -06:00
|
|
|
|
2008-11-26 15:25:42 -06:00
|
|
|
SUBDIRS_ARCH=ipa-server ipa-client
|
|
|
|
SUBDIRS_INDEP=ipa-admintools ipa-radius-server ipa-radius-admintools
|
|
|
|
#ipa-python
|
2008-11-24 17:21:36 -06:00
|
|
|
|
2008-12-06 03:36:49 -06:00
|
|
|
# Using the default python version since ipa-python has no .so modules
|
2008-11-24 17:21:36 -06:00
|
|
|
# This has to be exported to make some magic below work.
|
|
|
|
export DH_OPTIONS
|
2008-12-06 03:36:49 -06:00
|
|
|
PYVERS=$(shell pyversions -d)
|
2008-11-24 17:21:36 -06:00
|
|
|
|
|
|
|
patch: patch-stamp
|
|
|
|
patch-stamp:
|
|
|
|
dpatch apply-all
|
|
|
|
dpatch cat-all >patch-stamp
|
|
|
|
|
|
|
|
configure: configure-stamp
|
|
|
|
configure-stamp: patch
|
|
|
|
dh_testdir
|
|
|
|
$(MAKE) IPA_VERSION_IS_GIT_SNAPSHOT=no version-update
|
2008-11-26 15:25:42 -06:00
|
|
|
cd ipa-server; libtoolize --copy --force; aclocal; autoheader; automake --add-missing --gnu; autoconf; ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib
|
|
|
|
cd ipa-client; libtoolize --copy --force; aclocal; autoheader; automake --add-missing --gnu; autoconf; ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib
|
2008-11-24 17:21:36 -06:00
|
|
|
touch $@
|
|
|
|
|
2008-11-25 15:07:30 -06:00
|
|
|
build: build-stamp
|
2008-12-06 03:36:49 -06:00
|
|
|
build-stamp: configure
|
2008-11-26 15:25:42 -06:00
|
|
|
@for subdir in $(SUBDIRS_ARCH); do \
|
2008-11-24 17:21:36 -06:00
|
|
|
(cd $$subdir && $(MAKE)) || exit 1; \
|
|
|
|
done
|
|
|
|
touch $@
|
|
|
|
|
|
|
|
clean: clean-patched unpatch
|
|
|
|
clean-patched:
|
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2008-11-26 15:25:42 -06:00
|
|
|
rm -f build-arch-stamp build-indep-stamp configure-stamp ipa-python/setup.py ipa-python/version.py RELEASE
|
2008-11-24 17:21:36 -06:00
|
|
|
rm -rf ipa-python/build
|
|
|
|
for i in "ipa-server" "ipa-client"; do \
|
2008-11-25 09:11:06 -06:00
|
|
|
(cd $$i && [ ! -f Makefile ] || $(MAKE) distclean); \
|
2008-11-26 15:25:42 -06:00
|
|
|
(cd $$i && rm -f COPYING INSTALL depcomp install-sh missing py-compile config.guess config.sub aclocal.m4 config.h.in version.m4); \
|
2008-11-24 17:21:36 -06:00
|
|
|
done
|
|
|
|
find . -name "*.pyo" -o -name "*.pyc" -type f -exec rm -f "{}" \;
|
|
|
|
find . -name "*.spec" -type f -exec rm -f "{}" \;
|
|
|
|
find . -name "ltmain.sh" -exec rm -f "{}" \;
|
|
|
|
find . -name "Makefile.in" -exec rm -f "{}" \;
|
|
|
|
find . -name "configure" -exec rm -f "{}" \;
|
|
|
|
dh_clean
|
|
|
|
|
|
|
|
unpatch:
|
|
|
|
dpatch deapply-all
|
|
|
|
rm -rf patch-stamp debian/patched
|
|
|
|
|
2008-12-06 03:36:49 -06:00
|
|
|
install: $(PYVERS:%=install-%)
|
2008-11-24 17:21:36 -06:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
2008-11-25 15:07:30 -06:00
|
|
|
dh_clean -k
|
|
|
|
dh_installdirs
|
2008-11-26 15:25:42 -06:00
|
|
|
@for subdir in $(SUBDIRS_ARCH) $(SUBDIRS_INDEP); do \
|
2008-11-24 17:21:36 -06:00
|
|
|
(cd $$subdir && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install) || exit 1; \
|
|
|
|
done
|
2008-11-25 09:11:06 -06:00
|
|
|
rm -f $(CURDIR)/debian/tmp/usr/share/ipa/ipagui/static/javascript/prototype.js \
|
|
|
|
$(CURDIR)/debian/tmp/usr/share/ipa/ipagui/static/javascript/scriptaculous.js
|
2008-11-26 15:25:42 -06:00
|
|
|
find $(CURDIR)/debian/tmp -type f -name "*.py[oc]" -exec rm -f "{}" \;
|
2008-11-25 15:07:30 -06:00
|
|
|
dh_install
|
2008-11-24 17:21:36 -06:00
|
|
|
|
2008-12-06 03:36:49 -06:00
|
|
|
install-%:
|
2008-11-30 16:51:37 -06:00
|
|
|
echo "Doing: $@"
|
|
|
|
@for subdir in "ipa-python"; do \
|
2008-12-06 03:36:49 -06:00
|
|
|
(cd $$subdir && $* setup.py build) || exit 1; \
|
2008-11-30 16:51:37 -06:00
|
|
|
done
|
2008-11-26 15:25:42 -06:00
|
|
|
@for subdir in "ipa-python"; do \
|
2008-12-06 03:36:49 -06:00
|
|
|
(cd $$subdir && $* setup.py install \
|
2008-11-26 15:25:42 -06:00
|
|
|
--no-compile \
|
|
|
|
--root $(CURDIR)/debian/tmp/usr/share/python-support/python-freeipa) || exit 1; \
|
|
|
|
done
|
|
|
|
|
2008-11-25 15:07:30 -06:00
|
|
|
binary-indep: build install
|
|
|
|
|
|
|
|
binary-arch: build install
|
2008-11-24 17:21:36 -06:00
|
|
|
dh_testdir
|
|
|
|
dh_testroot
|
|
|
|
dh_installchangelogs
|
|
|
|
dh_installdocs
|
|
|
|
dh_installexamples
|
2008-11-25 11:43:34 -06:00
|
|
|
dh_installdirs
|
2008-11-25 09:11:06 -06:00
|
|
|
dh_installinit
|
2008-11-24 17:21:36 -06:00
|
|
|
dh_installman
|
|
|
|
dh_link
|
2008-11-26 15:25:42 -06:00
|
|
|
dh_pysupport
|
2008-11-24 17:21:36 -06:00
|
|
|
dh_strip
|
|
|
|
dh_compress
|
|
|
|
dh_fixperms
|
|
|
|
dh_makeshlibs
|
|
|
|
dh_installdeb
|
|
|
|
dh_shlibdeps
|
|
|
|
dh_gencontrol
|
|
|
|
dh_md5sums
|
|
|
|
dh_builddeb
|
|
|
|
|
2008-11-25 15:07:30 -06:00
|
|
|
binary: binary-indep binary-arch
|
2008-12-06 03:36:49 -06:00
|
|
|
.PHONY: build clean binary-indep binary-arch binary install configure
|