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)
|
|
|
|
|
|
2018-03-31 13:16:39 +03:00
|
|
|
ONLY_CLIENT=0
|
2011-10-28 15:12:50 +03:00
|
|
|
DESTDIR=$(CURDIR)/debian/tmp
|
2008-11-24 23:21:36 +00:00
|
|
|
|
2015-03-04 14:35:20 +02:00
|
|
|
JAVA_STACK_SIZE ?= 8m
|
2015-03-04 12:11:27 +02:00
|
|
|
export JAVA_STACK_SIZE
|
2018-04-06 17:00:23 +03:00
|
|
|
export PYTHON=python
|
2008-11-24 23:21:36 +00:00
|
|
|
|
2018-03-31 13:16:39 +03:00
|
|
|
confflags = \
|
|
|
|
|
--libexecdir=/usr/lib/ \
|
|
|
|
|
--with-ipaplatform=debian \
|
|
|
|
|
--with-sysconfenvdir=/etc/default \
|
|
|
|
|
--disable-pylint \
|
|
|
|
|
--without-jslint
|
|
|
|
|
|
|
|
|
|
ifeq ($(ONLY_CLIENT), 1)
|
|
|
|
|
confflags += --disable-server \
|
|
|
|
|
--without-ipatests
|
|
|
|
|
else
|
|
|
|
|
confflags += --enable-server \
|
|
|
|
|
--with-ipatests
|
|
|
|
|
endif
|
|
|
|
|
|
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:
|
2017-03-15 14:07:53 +02:00
|
|
|
git archive --format=tar experimental --prefix=$(SOURCE)-$(UV)/ | \
|
|
|
|
|
xz --best \
|
|
|
|
|
> ../$(SOURCE)_$(UV).orig.tar.xz
|
2008-11-24 23:21:36 +00:00
|
|
|
|
2018-03-31 13:16:39 +03:00
|
|
|
gencontrol:
|
|
|
|
|
ifeq ($(ONLY_CLIENT), 1)
|
|
|
|
|
cat debian/control.stub \
|
|
|
|
|
debian/control.common \
|
|
|
|
|
> debian/control
|
|
|
|
|
else
|
|
|
|
|
cat debian/control.stub \
|
|
|
|
|
debian/control.common \
|
|
|
|
|
debian/control.server \
|
|
|
|
|
> debian/control
|
|
|
|
|
endif
|
|
|
|
|
|
2018-03-31 13:38:25 +03:00
|
|
|
override_dh_clean: gencontrol
|
|
|
|
|
dh_clean
|
2018-04-06 17:04:33 +03:00
|
|
|
if [ -f /usr/bin/git ]; then \
|
|
|
|
|
git checkout -- po; \
|
|
|
|
|
fi
|
2018-03-31 13:38:25 +03:00
|
|
|
|
2018-03-31 13:16:39 +03:00
|
|
|
override_dh_auto_configure: gencontrol
|
|
|
|
|
dh_auto_configure -- $(confflags)
|
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:
|
2017-03-15 14:07:53 +02:00
|
|
|
dh_auto_install --max-parallel=1
|
2014-01-24 17:36:54 +02:00
|
|
|
|
2018-03-31 13:16:39 +03:00
|
|
|
ifneq ($(ONLY_CLIENT), 1)
|
2016-01-08 00:39:24 +02:00
|
|
|
chmod 755 $(DESTDIR)/usr/lib/ipa/certmonger/*
|
2014-07-01 20:20:58 +03:00
|
|
|
|
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
|
2018-03-31 13:38:25 +03:00
|
|
|
endif
|
2014-10-21 00:02:15 +03:00
|
|
|
|
2017-03-15 14:07:53 +02:00
|
|
|
mkdir -p $(DESTDIR)/usr/share/bash-completion/completions \
|
|
|
|
|
install -m 0644 contrib/completion/ipa.bash_completion \
|
|
|
|
|
$(DESTDIR)/usr/share/bash-completion/completions/ipa
|
|
|
|
|
rm -rf $(DESTDIR)/etc/bash_completion.d
|
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 "{}" \;
|
2017-03-15 14:07:53 +02:00
|
|
|
# remove files which are useful only for make uninstall
|
|
|
|
|
find $(CURDIR)/debian/tmp -wholename '*/dist-packages/*/install_files.txt' -exec rm '{}' \;
|
2012-02-16 23:24:02 +02:00
|
|
|
|
2018-04-07 00:41:25 +03:00
|
|
|
# we still need to use python2
|
|
|
|
|
find debian/tmp ! -name '*.pyc' -a ! -name '*.pyo' -a \
|
|
|
|
|
-type f -exec grep -qsm1 '^#!.*\bpython' {} \; \
|
|
|
|
|
-exec sed -i -e '1 s|^#!.*\bpython[^ ]*|#!/usr/bin/python|' {} \;
|
|
|
|
|
|
2017-12-21 18:15:13 +02:00
|
|
|
override_dh_missing:
|
|
|
|
|
dh_missing --fail-missing
|
2008-11-24 23:21:36 +00:00
|
|
|
|
2018-03-31 13:16:39 +03:00
|
|
|
ifneq ($(ONLY_CLIENT), 1)
|
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-dnskeysyncd.service
|
|
|
|
|
dh_systemd_enable -pfreeipa-server --no-enable ipa-custodia.service
|
|
|
|
|
dh_systemd_enable -pfreeipa-server --no-enable ipa-ods-exporter.service
|
2018-03-31 13:16:39 +03:00
|
|
|
endif
|
2016-03-30 06:49:02 +03:00
|
|
|
|
2014-11-05 14:33:50 +02:00
|
|
|
override_dh_fixperms:
|
2016-01-05 15:50:07 +02:00
|
|
|
dh_fixperms
|
2016-10-05 21:35:47 +03:00
|
|
|
|
|
|
|
|
# check needed to not fail arch-indep build which doesn't run dh_installdirs
|
|
|
|
|
if [ -d $(CURDIR)/debian/freeipa-server/etc/ipa/custodia ]; then \
|
|
|
|
|
chmod 0700 $(CURDIR)/debian/freeipa-server/etc/ipa/custodia; \
|
|
|
|
|
chmod 0700 $(CURDIR)/debian/freeipa-server/var/lib/ipa/backup; \
|
|
|
|
|
fi
|
2014-11-05 14:33:50 +02:00
|
|
|
|
2011-10-28 15:12:50 +03:00
|
|
|
%:
|
2017-12-22 19:10:48 +02:00
|
|
|
dh $@ --with autoreconf,python2,systemd
|
|
|
|
|
# --builddirectory=build
|