Files
freeipa/debian/rules

125 lines
4.6 KiB
Plaintext
Raw Normal View History

#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
#export DH_VERBOSE=1
2016-01-05 13:26:35 +02:00
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
ONLY_CLIENT=0
DESTDIR=$(CURDIR)/debian/tmp
export SKIP_API_VERSION_CHECK="yes"
2016-03-10 11:27:18 +02:00
export SUPPORTED_PLATFORM=debian
PLATFORM="SUPPORTED_PLATFORM=debian"
2015-03-04 14:35:20 +02:00
JAVA_STACK_SIZE ?= 8m
export JAVA_STACK_SIZE
# 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:
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
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
2011-11-01 17:52:25 -04:00
override_dh_autoreconf:
make IPA_VERSION_IS_GIT_SNAPSHOT=no version-update
dh_autoreconf; cd ..
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 -- \
--libexecdir=/usr/lib \
2014-01-14 23:47:24 +02:00
--with-openldap \
--with-systemdsystemunitdir=/lib/systemd/system
dh_auto_configure -Dinstall -- \
--libexecdir=/usr/lib
2011-10-29 08:28:11 +03:00
endif
override_dh_auto_build:
2011-10-29 08:28:11 +03:00
ifneq ($(ONLY_CLIENT), 1)
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no all
# cd selinux ; make all
2011-10-29 08:28:11 +03:00
else
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no client
2011-10-29 08:28:11 +03:00
endif
# tests would just fail, they need a proper environment with 389 running et al
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
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no install DESTDIR=$(DESTDIR)
2011-10-29 08:28:11 +03:00
cd ..
chmod 755 $(DESTDIR)/usr/lib/ipa/certmonger/*
2014-07-01 20:20:58 +03:00
mkdir -p $(DESTDIR)/usr/share/bash-completion/completions \
$(DESTDIR)/etc/default \
$(DESTDIR)/etc/ipa/kdcproxy \
$(DESTDIR)/usr/share/ipa/html
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
touch $(DESTDIR)/usr/share/ipa/html/krb5.ini
touch $(DESTDIR)/usr/share/ipa/html/krbrealm.con
install -m 0644 init/ipa_memcached.conf $(DESTDIR)/etc/default/ipa_memcached
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
install -m 0644 install/share/kdcproxy.conf $(DESTDIR)/etc/ipa/kdcproxy/kdcproxy.conf
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
install -m 0644 init/systemd/ipa_memcached.service $(DESTDIR)/lib/systemd/system
install -m 0644 init/systemd/ipa.service $(DESTDIR)/lib/systemd/system
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
make $(PLATFORM) IPA_VERSION_IS_GIT_SNAPSHOT=no client-install DESTDIR=$(DESTDIR)
2011-10-29 08:28:11 +03:00
endif
# 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 '{}' ';'
# fix permissions
find $(CURDIR)/debian/tmp -name "*.mo" -type f -exec chmod -x "{}" \;
override_dh_install:
2014-07-01 20:20:58 +03:00
dh_install --fail-missing
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
override_dh_fixperms:
dh_fixperms
chmod 0700 $(CURDIR)/debian/freeipa-server/etc/ipa/custodia
chmod 0700 $(CURDIR)/debian/freeipa-server/var/lib/ipa/backup
%:
dh $@ --with autoreconf,python2,systemd