2008-12-06 07:16:49 -06:00
|
|
|
#!/usr/bin/make -f
|
2008-11-24 17:21:36 -06:00
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
2012-01-02 08:09:40 -06:00
|
|
|
#export DH_VERBOSE=1
|
2008-11-24 17:21:36 -06:00
|
|
|
|
2012-01-02 08:09:40 -06:00
|
|
|
ONLY_CLIENT=0
|
2011-10-28 07:12:50 -05:00
|
|
|
DESTDIR=$(CURDIR)/debian/tmp
|
2008-11-24 17:21:36 -06:00
|
|
|
|
2011-11-02 08:13:16 -05:00
|
|
|
PLATFORM="SUPPORTED_PLATFORM=debian"
|
2015-03-04 06:35:20 -06:00
|
|
|
JAVA_STACK_SIZE ?= 8m
|
2015-03-04 04:11:27 -06:00
|
|
|
export JAVA_STACK_SIZE
|
2008-11-24 17:21:36 -06:00
|
|
|
|
2014-06-26 08:09:10 -05:00
|
|
|
# For maintainer use only, generate a tarball:
|
|
|
|
SOURCE = freeipa
|
|
|
|
gentarball: UV=$(shell dpkg-parsechangelog|awk '/^Version:/ {print $$2}'|sed 's/-.*$$//')
|
|
|
|
gentarball:
|
2014-10-15 06:10:16 -05:00
|
|
|
git archive --format=tar upstream --prefix=$(SOURCE)-$(UV)/ | xz --best > ../$(SOURCE)_$(UV).orig.tar.xz
|
2014-06-26 08:09:10 -05:00
|
|
|
|
2011-10-28 07:12:50 -05:00
|
|
|
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
|
2008-11-24 17:21:36 -06:00
|
|
|
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
|
2008-11-24 17:21:36 -06:00
|
|
|
|
2011-11-01 16:52:25 -05:00
|
|
|
override_dh_autoreconf:
|
|
|
|
make IPA_VERSION_IS_GIT_SNAPSHOT=no version-update
|
|
|
|
dh_autoreconf; cd ..
|
2008-11-24 17:21:36 -06:00
|
|
|
|
2011-10-28 07:12:50 -05:00
|
|
|
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
|
2011-10-28 07:12:50 -05:00
|
|
|
|
|
|
|
override_dh_auto_build:
|
2011-10-29 00:28:11 -05:00
|
|
|
ifneq ($(ONLY_CLIENT), 1)
|
2011-11-02 08:13:16 -05:00
|
|
|
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no all
|
2012-01-02 08:09:40 -06:00
|
|
|
# cd selinux ; make all
|
2011-10-29 00:28:11 -05:00
|
|
|
else
|
2011-11-02 08:13:16 -05:00
|
|
|
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no client
|
2011-10-29 00:28:11 -05:00
|
|
|
endif
|
2008-11-26 15:25:42 -06:00
|
|
|
|
2013-12-07 13:24:18 -06:00
|
|
|
# tests would just fail, they need a proper environment with 389 running et al
|
2011-11-01 10:54:35 -05:00
|
|
|
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
|
2011-11-02 08:13:16 -05:00
|
|
|
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no install DESTDIR=$(DESTDIR)
|
2011-10-29 00:28:11 -05:00
|
|
|
cd ..
|
2014-01-24 09:36:54 -06:00
|
|
|
|
2014-07-01 12:20:58 -05:00
|
|
|
chmod 755 $(DESTDIR)/usr/lib/*/ipa/certmonger/*
|
|
|
|
|
2014-10-20 16:02:15 -05:00
|
|
|
mkdir -p $(DESTDIR)/etc/bash_completion.d \
|
2014-09-12 06:12:10 -05:00
|
|
|
$(DESTDIR)/etc/default \
|
|
|
|
$(DESTDIR)/usr/share/ipa/html
|
2014-10-20 16:02:15 -05:00
|
|
|
|
|
|
|
touch $(DESTDIR)/usr/share/ipa/html/ca.crt
|
|
|
|
touch $(DESTDIR)/usr/share/ipa/html/configure.jar
|
|
|
|
touch $(DESTDIR)/usr/share/ipa/html/kerberosauth.xpi
|
|
|
|
touch $(DESTDIR)/usr/share/ipa/html/krb.con
|
|
|
|
touch $(DESTDIR)/usr/share/ipa/html/krb.js
|
2014-09-12 06:12:10 -05:00
|
|
|
touch $(DESTDIR)/usr/share/ipa/html/krb5.ini
|
2014-10-20 16:02:15 -05:00
|
|
|
touch $(DESTDIR)/usr/share/ipa/html/krbrealm.con
|
|
|
|
touch $(DESTDIR)/usr/share/ipa/html/preferences.html
|
|
|
|
|
2014-09-12 06:12:10 -05:00
|
|
|
install -m 0644 contrib/completion/ipa.bash_completion $(DESTDIR)/etc/bash_completion.d/ipa
|
2014-10-20 16:02:15 -05:00
|
|
|
install -m 0644 init/ipa_memcached.conf $(DESTDIR)/etc/default/ipa_memcached
|
2014-09-12 06:12:10 -05:00
|
|
|
install -m 0644 init/systemd/ipa_memcached.service $(DESTDIR)/lib/systemd/system
|
|
|
|
install -m 0644 init/systemd/ipa.service $(DESTDIR)/lib/systemd/system
|
2014-09-15 07:27:51 -05:00
|
|
|
install -m 0755 debian/generate-rndc-key.sh $(DESTDIR)/usr/share/ipa
|
2011-10-29 00:28:11 -05:00
|
|
|
else
|
2011-11-02 08:13:16 -05:00
|
|
|
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no client-install DESTDIR=$(DESTDIR)
|
2011-10-29 00:28:11 -05:00
|
|
|
endif
|
2008-11-25 15:07:30 -06:00
|
|
|
|
2012-01-02 08:09:40 -06:00
|
|
|
# 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 '{}' ';'
|
2012-02-16 15:24:02 -06:00
|
|
|
# fix permissions
|
|
|
|
find $(CURDIR)/debian/tmp -name "*.mo" -type f -exec chmod -x "{}" \;
|
|
|
|
|
2014-07-25 16:26:43 -05:00
|
|
|
override_dh_install:
|
2014-07-01 12:20:58 -05:00
|
|
|
dh_install --fail-missing
|
2008-11-24 17:21:36 -06:00
|
|
|
|
2014-11-05 06:33:50 -06:00
|
|
|
ifneq ($(ONLY_CLIENT), 1)
|
|
|
|
mkdir -m 770 -p $(CURDIR)/debian/freeipa-server/var/cache/bind/data
|
2014-11-05 06:42:11 -06:00
|
|
|
mkdir -m 700 -p $(CURDIR)/debian/freeipa-server/var/lib/ipa/backup
|
2014-11-05 06:33:50 -06:00
|
|
|
endif
|
|
|
|
|
|
|
|
override_dh_fixperms:
|
2014-11-05 06:42:11 -06:00
|
|
|
dh_fixperms -X var/cache/bind/data -X var/lib/ipa/backup
|
2014-11-05 06:33:50 -06:00
|
|
|
|
2011-10-28 07:12:50 -05:00
|
|
|
%:
|
2014-09-12 06:12:10 -05:00
|
|
|
dh $@ --with autoreconf,python2,systemd
|