Files
freeipa/debian/rules
T

123 lines
3.7 KiB
Makefile
Raw Normal View History

2008-12-06 13:16:49 +00:00
#!/usr/bin/make -f
# Uncomment this to turn on verbose mode.
2012-01-02 16:09:40 +02:00
#export DH_VERBOSE=1
2019-05-05 14:06:26 +03:00
include /usr/share/dpkg/pkg-info.mk
2016-01-05 13:26:35 +02:00
DEB_HOST_MULTIARCH ?= $(shell dpkg-architecture -qDEB_HOST_MULTIARCH)
# build server only where nodejs is available
ifneq (,$(filter $(DEB_HOST_ARCH), amd64 arm64 armhf i386 mips mips64el mipsel ppc64 ppc64el s390x))
ONLY_CLIENT=0
else
ONLY_CLIENT=1
endif
2011-10-28 15:12:50 +03:00
DESTDIR=$(CURDIR)/debian/tmp
2019-08-08 23:37:45 +03:00
export PYTHON=python3
export am_cv_python_pythondir=/usr/lib/python3/dist-packages
export am_cv_python_pyexecdir=/usr/lib/python3/dist-packages
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
# For maintainer use only, generate a tarball:
gentarball:
2019-05-05 14:06:26 +03:00
tar --transform 's,^,$(DEB_SOURCE)-$(DEB_VERSION_UPSTREAM)/,' \
--exclude './debian' --exclude-vcs \
-cJf ../$(DEB_SOURCE)_$(DEB_VERSION_UPSTREAM).orig.tar.xz .
gencontrol:
ifeq ($(ONLY_CLIENT), 1)
cat debian/control.stub \
debian/control.common \
> debian/control
else
cat debian/control.stub \
2019-02-12 14:48:32 +02:00
debian/control.server-bdeps \
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-12 00:39:56 +03:00
rm -f po/*.gmo po/Makefile.hack po/POTFILES.in po/ipa.pot po/stamp-po
rm -rf contrib/completion/ipa.bash_completion daemons/ipa-version.h \
install/ui/src/libs/loader.js m4
rm -f ipaplatform/override.py ipapython/version.py ipasetup.py
2018-03-31 13:38:25 +03:00
override_dh_auto_configure: gencontrol
dh_auto_configure -- $(confflags)
2008-11-26 21:25:42 +00: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:
dh_auto_install --max-parallel=1
ifneq ($(ONLY_CLIENT), 1)
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
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 '{}' ';'
# fix permissions
find $(CURDIR)/debian/tmp -name "*.mo" -type f -exec chmod -x "{}" \;
# remove files which are useful only for make uninstall
find $(CURDIR)/debian/tmp -wholename '*/dist-packages/*/install_files.txt' -exec rm '{}' \;
2019-08-09 00:19:40 +03:00
# fix the interpreter
find debian/tmp ! -name '*.pyc' -a ! -name '*.pyo' -a \
-type f -exec grep -qsm1 '^#!.*\bpython' {} \; \
-exec sed -i -e '1 s|^#!.*\bpython[^ ]*|#!/usr/bin/python3|' {} \;
2017-12-21 18:15:13 +02:00
override_dh_missing:
dh_missing --fail-missing
ifneq ($(ONLY_CLIENT), 1)
2018-08-04 10:57:40 +03:00
override_dh_installsystemd:
dh_installsystemd -pfreeipa-server --no-enable ipa.service
dh_installsystemd -pfreeipa-server --no-enable ipa-dnskeysyncd.service
dh_installsystemd -pfreeipa-server --no-enable ipa-custodia.service
dh_installsystemd -pfreeipa-server --no-enable ipa-ods-exporter.service
endif
override_dh_fixperms:
dh_fixperms
# 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
2011-10-28 15:12:50 +03:00
%:
2019-08-08 23:37:45 +03:00
dh $@ --with python3
# --builddirectory=build