2008-12-06 13:16:49 +00:00
|
|
|
#!/usr/bin/make -f
|
2008-11-24 23:21:36 +00:00
|
|
|
|
|
|
|
|
# Uncomment this to turn on verbose mode.
|
2012-01-02 16:09:40 +02:00
|
|
|
#export DH_VERBOSE=1
|
2008-11-24 23:21:36 +00:00
|
|
|
|
2016-01-05 13:26:35 +02:00
|
|
|
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
|
|
|
|
|
|
2012-01-02 16:09:40 +02:00
|
|
|
ONLY_CLIENT=0
|
2011-10-28 15:12:50 +03:00
|
|
|
DESTDIR=$(CURDIR)/debian/tmp
|
2008-11-24 23:21:36 +00:00
|
|
|
|
2016-03-09 00:21:44 +02:00
|
|
|
export SKIP_API_VERSION_CHECK="yes"
|
2016-03-10 11:27:18 +02:00
|
|
|
export SUPPORTED_PLATFORM=debian
|
2011-11-02 09:13:16 -04:00
|
|
|
PLATFORM="SUPPORTED_PLATFORM=debian"
|
2015-03-04 14:35:20 +02:00
|
|
|
JAVA_STACK_SIZE ?= 8m
|
2015-03-04 12:11:27 +02:00
|
|
|
export JAVA_STACK_SIZE
|
2008-11-24 23:21:36 +00:00
|
|
|
|
2014-06-26 16:09:10 +03:00
|
|
|
# For maintainer use only, generate a tarball:
|
|
|
|
|
SOURCE = freeipa
|
|
|
|
|
gentarball: UV=$(shell dpkg-parsechangelog|awk '/^Version:/ {print $$2}'|sed 's/-.*$$//')
|
|
|
|
|
gentarball:
|
2016-03-08 21:08:45 +02:00
|
|
|
git archive --format=tar experimental --prefix=$(SOURCE)-$(UV)/ | xz --best > ../$(SOURCE)_$(UV).orig.tar.xz
|
2014-06-26 16:09:10 +03:00
|
|
|
|
2011-10-28 15:12:50 +03:00
|
|
|
override_dh_auto_clean:
|
2016-03-09 00:21:44 +02:00
|
|
|
for i in asn1 daemons install ipalib ipapython; do \
|
2011-11-01 17:49:50 -04: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 23:21:36 +00: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 "{}" \;
|
2016-03-10 11:27:18 +02:00
|
|
|
rm -rf daemons/ipa-version.h freeipa.spec freeipa.egg-info version.m4
|
2011-11-01 18:04:54 -04:00
|
|
|
rm -rf ipapython/build RELEASE build
|
2008-11-24 23:21:36 +00:00
|
|
|
|
2011-11-01 17:52:25 -04:00
|
|
|
override_dh_autoreconf:
|
|
|
|
|
make IPA_VERSION_IS_GIT_SNAPSHOT=no version-update
|
|
|
|
|
dh_autoreconf; cd ..
|
2008-11-24 23:21:36 +00:00
|
|
|
|
2011-10-28 15:12:50 +03:00
|
|
|
override_dh_auto_configure:
|
2016-03-10 11:27:18 +02:00
|
|
|
dh_auto_configure -Dclient
|
2011-10-29 08:28:11 +03:00
|
|
|
ifneq ($(ONLY_CLIENT), 1)
|
2014-01-14 23:47:24 +02:00
|
|
|
dh_auto_configure -Ddaemons -- \
|
2016-01-07 19:45:02 +02:00
|
|
|
--libexecdir=/usr/lib \
|
2014-01-14 23:47:24 +02:00
|
|
|
--with-openldap \
|
|
|
|
|
--with-systemdsystemunitdir=/lib/systemd/system
|
|
|
|
|
|
2016-01-07 19:45:02 +02:00
|
|
|
dh_auto_configure -Dinstall -- \
|
|
|
|
|
--libexecdir=/usr/lib
|
2011-10-29 08:28:11 +03:00
|
|
|
endif
|
2011-10-28 15:12:50 +03:00
|
|
|
|
|
|
|
|
override_dh_auto_build:
|
2011-10-29 08:28:11 +03:00
|
|
|
ifneq ($(ONLY_CLIENT), 1)
|
2011-11-02 09:13:16 -04:00
|
|
|
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no all
|
2012-01-02 16:09:40 +02:00
|
|
|
# cd selinux ; make all
|
2011-10-29 08:28:11 +03:00
|
|
|
else
|
2011-11-02 09:13:16 -04:00
|
|
|
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no client
|
2011-10-29 08:28:11 +03:00
|
|
|
endif
|
2008-11-26 21:25:42 +00:00
|
|
|
|
2013-12-07 21:24:18 +02:00
|
|
|
# tests would just fail, they need a proper environment with 389 running et al
|
2011-11-01 11:54:35 -04:00
|
|
|
override_dh_auto_test:
|
|
|
|
|
|
2011-11-01 12:12:14 -04:00
|
|
|
override_dh_auto_install:
|
2011-10-29 08:28:11 +03:00
|
|
|
ifneq ($(ONLY_CLIENT), 1)
|
|
|
|
|
# Force re-generate of platform support
|
|
|
|
|
rm -f ipapython/services.py
|
2011-11-02 09:13:16 -04:00
|
|
|
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no install DESTDIR=$(DESTDIR)
|
2011-10-29 08:28:11 +03:00
|
|
|
cd ..
|
2014-01-24 17:36:54 +02:00
|
|
|
|
2016-01-08 00:39:24 +02:00
|
|
|
chmod 755 $(DESTDIR)/usr/lib/ipa/certmonger/*
|
2014-07-01 20:20:58 +03:00
|
|
|
|
2016-01-05 10:40:24 +02:00
|
|
|
mkdir -p $(DESTDIR)/usr/share/bash-completion/completions \
|
2014-09-12 14:12:10 +03:00
|
|
|
$(DESTDIR)/etc/default \
|
2016-01-04 21:50:55 +02:00
|
|
|
$(DESTDIR)/etc/ipa/kdcproxy \
|
2014-09-12 14:12:10 +03:00
|
|
|
$(DESTDIR)/usr/share/ipa/html
|
2014-10-21 00:02:15 +03:00
|
|
|
|
|
|
|
|
touch $(DESTDIR)/usr/share/ipa/html/ca.crt
|
|
|
|
|
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 14:12:10 +03:00
|
|
|
touch $(DESTDIR)/usr/share/ipa/html/krb5.ini
|
2014-10-21 00:02:15 +03:00
|
|
|
touch $(DESTDIR)/usr/share/ipa/html/krbrealm.con
|
|
|
|
|
|
|
|
|
|
install -m 0644 init/ipa_memcached.conf $(DESTDIR)/etc/default/ipa_memcached
|
2016-03-08 19:13:25 +02:00
|
|
|
install -m 0644 init/ipa-dnskeysyncd.conf $(DESTDIR)/etc/default/ipa-dnskeysyncd
|
|
|
|
|
install -m 0644 init/ipa-ods-exporter.conf $(DESTDIR)/etc/default/ipa-ods-exporter
|
2016-01-04 21:50:55 +02:00
|
|
|
install -m 0644 install/share/kdcproxy.conf $(DESTDIR)/etc/ipa/kdcproxy/kdcproxy.conf
|
2016-03-08 19:13:25 +02:00
|
|
|
install -m 0755 daemons/dnssec/ipa-dnskeysync-replica $(DESTDIR)/usr/lib/ipa/
|
|
|
|
|
install -m 0755 daemons/dnssec/ipa-dnskeysyncd $(DESTDIR)/usr/lib/ipa/
|
|
|
|
|
install -m 0644 daemons/dnssec/ipa-dnskeysyncd.service $(DESTDIR)/lib/systemd/system
|
|
|
|
|
install -m 0755 daemons/dnssec/ipa-ods-exporter $(DESTDIR)/usr/lib/ipa/
|
|
|
|
|
install -m 0644 daemons/dnssec/ipa-ods-exporter.service $(DESTDIR)/lib/systemd/system
|
|
|
|
|
install -m 0644 daemons/dnssec/ipa-ods-exporter.socket $(DESTDIR)/lib/systemd/system
|
2014-09-12 14:12:10 +03:00
|
|
|
install -m 0644 init/systemd/ipa_memcached.service $(DESTDIR)/lib/systemd/system
|
|
|
|
|
install -m 0644 init/systemd/ipa.service $(DESTDIR)/lib/systemd/system
|
2016-01-05 15:42:52 +02:00
|
|
|
install -m 0644 init/systemd/ipa-custodia.service $(DESTDIR)/lib/systemd/system
|
|
|
|
|
install -m 0644 contrib/completion/ipa.bash_completion $(DESTDIR)/usr/share/bash-completion/completions/ipa
|
2016-01-05 13:26:35 +02:00
|
|
|
|
2011-10-29 08:28:11 +03:00
|
|
|
else
|
2011-11-02 09:13:16 -04:00
|
|
|
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no client-install DESTDIR=$(DESTDIR)
|
2011-10-29 08:28:11 +03:00
|
|
|
endif
|
2008-11-25 21:07:30 +00:00
|
|
|
|
2012-01-02 16:09:40 +02:00
|
|
|
# purge .la files
|
|
|
|
|
find $(CURDIR)/debian/tmp -name "*.la" -type f -exec rm -f "{}" \;
|
2012-02-17 00:21:46 +02:00
|
|
|
# purge precompiled .pyc/.pyo files
|
|
|
|
|
find $(CURDIR)/debian/tmp -name '*.py[c,o]' -exec rm '{}' ';'
|
2012-02-16 23:24:02 +02:00
|
|
|
# fix permissions
|
|
|
|
|
find $(CURDIR)/debian/tmp -name "*.mo" -type f -exec chmod -x "{}" \;
|
|
|
|
|
|
2014-07-25 23:26:43 +02:00
|
|
|
override_dh_install:
|
2014-07-01 20:20:58 +03:00
|
|
|
dh_install --fail-missing
|
2008-11-24 23:21:36 +00:00
|
|
|
|
2016-03-30 06:49:02 +03:00
|
|
|
override_dh_systemd_enable:
|
|
|
|
|
dh_systemd_enable -pfreeipa-server --no-enable ipa.service
|
|
|
|
|
dh_systemd_enable -pfreeipa-server --no-enable ipa_memcached.service
|
|
|
|
|
dh_systemd_enable -pfreeipa-server --no-enable ipa-dnskeysyncd.service
|
|
|
|
|
dh_systemd_enable -pfreeipa-server --no-enable ipa-custodia.service
|
|
|
|
|
dh_systemd_enable -pfreeipa-server --no-enable ipa-ods-exporter.service
|
|
|
|
|
|
2014-11-05 14:33:50 +02:00
|
|
|
override_dh_fixperms:
|
2016-01-05 15:50:07 +02:00
|
|
|
dh_fixperms
|
2016-01-05 15:42:52 +02:00
|
|
|
chmod 0700 $(CURDIR)/debian/freeipa-server/etc/ipa/custodia
|
2016-01-05 15:50:07 +02:00
|
|
|
chmod 0700 $(CURDIR)/debian/freeipa-server/var/lib/ipa/backup
|
2014-11-05 14:33:50 +02:00
|
|
|
|
2011-10-28 15:12:50 +03:00
|
|
|
%:
|
2014-09-12 14:12:10 +03:00
|
|
|
dh $@ --with autoreconf,python2,systemd
|