freeipa/debian/rules

105 lines
3.0 KiB
Plaintext
Raw Normal View History

#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
export DH_VERBOSE=1
SUBDIRS_ARCH=ipa-server ipa-client
SUBDIRS_INDEP=ipa-admintools ipa-radius-server ipa-radius-admintools
#ipa-python
# Using the default python version since ipa-python has no .so modules
# This has to be exported to make some magic below work.
export DH_OPTIONS
PYVERS=$(shell pyversions -d)
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
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
touch $@
build: build-stamp
build-stamp: configure
@for subdir in $(SUBDIRS_ARCH); do \
(cd $$subdir && $(MAKE)) || exit 1; \
done
touch $@
clean: clean-patched unpatch
clean-patched:
dh_testdir
dh_testroot
rm -f build-arch-stamp build-indep-stamp configure-stamp ipa-python/setup.py ipa-python/version.py RELEASE
rm -rf ipa-python/build
for i in "ipa-server" "ipa-client"; do \
(cd $$i && [ ! -f Makefile ] || $(MAKE) distclean); \
(cd $$i && rm -f COPYING INSTALL depcomp install-sh missing py-compile config.guess config.sub aclocal.m4 config.h.in version.m4); \
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
install: $(PYVERS:%=install-%)
dh_testdir
dh_testroot
dh_clean -k
dh_installdirs
@for subdir in $(SUBDIRS_ARCH) $(SUBDIRS_INDEP); do \
(cd $$subdir && $(MAKE) DESTDIR=$(CURDIR)/debian/tmp install) || exit 1; \
done
rm -f $(CURDIR)/debian/tmp/usr/share/ipa/ipagui/static/javascript/prototype.js \
$(CURDIR)/debian/tmp/usr/share/ipa/ipagui/static/javascript/scriptaculous.js
find $(CURDIR)/debian/tmp -type f -name "*.py[oc]" -exec rm -f "{}" \;
dh_install
install-%:
echo "Doing: $@"
@for subdir in "ipa-python"; do \
(cd $$subdir && $* setup.py build) || exit 1; \
done
@for subdir in "ipa-python"; do \
(cd $$subdir && $* setup.py install \
--no-compile \
--root $(CURDIR)/debian/tmp/usr/share/python-support/python-freeipa) || exit 1; \
done
binary-indep: build install
binary-arch: build install
dh_testdir
dh_testroot
dh_installchangelogs
dh_installdocs
dh_installexamples
dh_installdirs
dh_installinit
dh_installman
dh_link
dh_pysupport
dh_strip
dh_compress
dh_fixperms
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