freeipa/debian/rules

90 lines
2.9 KiB
Plaintext
Raw Normal View History

#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
ONLY_CLIENT=0
DESTDIR=$(CURDIR)/debian/tmp
PLATFORM="SUPPORTED_PLATFORM=debian"
# For maintainer use only, generate a tarball:
SOURCE = freeipa
gentarball: UV=$(shell dpkg-parsechangelog|awk '/^Version:/ {print $$2}'|sed 's/-.*$$//')
gentarball:
git archive --format=tar experimental --prefix=$(SOURCE)-$(UV)/ | xz --best > ../$(SOURCE)_$(UV).orig.tar.xz
override_dh_auto_clean:
2011-11-01 17:04:54 -05:00
for i in daemons install ipapython ipaserver ipa-client; do \
2011-11-01 16:49:50 -05:00
(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 "ltmain.sh" -exec rm -f "{}" \;
find . -name "configure" -exec rm -f "{}" \;
2011-11-01 16:49:50 -05:00
rm -rf daemons/ipa-version.h freeipa.spec freeipa.egg-info ipa-client/ipa-client.spec version.m4
2011-11-01 17:04:54 -05:00
rm -rf ipapython/build RELEASE build
dh_clean
rm -rf $(DESTDIR)
2011-11-01 16:52:25 -05:00
override_dh_autoreconf:
make IPA_VERSION_IS_GIT_SNAPSHOT=no version-update
dh_autoreconf; cd ..
override_dh_auto_configure:
2011-11-01 10:50:09 -05:00
dh_auto_configure -Dipa-client
2011-10-29 00:28:11 -05:00
ifneq ($(ONLY_CLIENT), 1)
2014-01-14 15:47:24 -06:00
dh_auto_configure -Ddaemons -- \
--with-openldap \
--with-systemdsystemunitdir=/lib/systemd/system
2011-11-01 10:50:09 -05:00
dh_auto_configure -Dinstall
2011-10-29 00:28:11 -05:00
endif
override_dh_auto_build:
2011-10-29 00:28:11 -05:00
ifneq ($(ONLY_CLIENT), 1)
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no all
# cd selinux ; make all
2011-10-29 00:28:11 -05:00
else
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no client
2011-10-29 00:28:11 -05:00
endif
# tests would just fail, they need a proper environment with 389 running et al
override_dh_auto_test:
2011-11-01 11:12:14 -05:00
override_dh_auto_install:
2011-10-29 00:28:11 -05:00
ifneq ($(ONLY_CLIENT), 1)
# Force re-generate of platform support
rm -f ipapython/services.py
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no install DESTDIR=$(DESTDIR)
# cd selinux
# make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no install DESTDIR=$(DESTDIR)
2011-10-29 00:28:11 -05:00
cd ..
2014-07-01 11:48:53 -05:00
mkdir -p $(DESTDIR)/etc/bash_completion.d
install -m 0644 contrib/completion/ipa.bash_completion $(DESTDIR)/etc/bash_completion.d/ipa
2014-07-01 12:20:58 -05:00
chmod 755 $(DESTDIR)/usr/lib/*/ipa/certmonger/*
rm -f $(DESTDIR)/usr/share/ipa/ui/js/dojo/dojo.js \
$(DESTDIR)/usr/share/ipa/ui/js/libs/jquery.js
ln -s /usr/share/javascript/dojo/dojo.js $(DESTDIR)/usr/share/ipa/ui/js/dojo/dojo.js
ln -s /usr/share/javascript/jquery/jquery.js $(DESTDIR)/usr/share/ipa/ui/js/libs/jquery.js
mkdir -m 700 $(DESTDIR)/var/lib/ipa/backup
2011-10-29 00:28:11 -05:00
else
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no client-install DESTDIR=$(DESTDIR)
2011-10-29 00:28:11 -05:00
endif
# purge .la files
find $(CURDIR)/debian/tmp -name "*.la" -type f -exec rm -f "{}" \;
2012-02-16 16:21:46 -06:00
# purge precompiled .pyc/.pyo files
find $(CURDIR)/debian/tmp -name '*.py[c,o]' -exec rm '{}' ';'
# fix permissions
find $(CURDIR)/debian/tmp -name "*.mo" -type f -exec chmod -x "{}" \;
2014-07-01 12:20:58 -05:00
dh_install --fail-missing
%:
dh $@ --with autoreconf,python2