1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134
|
include /usr/share/dpkg/architecture.mk
include /usr/share/dpkg/pkg-info.mk
CFLAGS += -D_FORTIFY_SOURCE=2
ONLY_CLIENT=1
DESTDIR=$(CURDIR)/debian/tmp
export PYTHON=python3
export am_cv_python_pythondir=/usr/lib/python3/dist-packages
export am_cv_python_pyexecdir=/usr/lib/python3/dist-packages
export systemdsystemunitdir=$(shell pkgconf --variable=systemdsystemunitdir systemd | sed s,^/,,)
confflags = \
--libexecdir=/usr/lib/ \
--with-ipaplatform=debian \
--with-sysconfenvdir=/etc/default \
--disable-pylint \
--without-ipa-join-xml \
--without-jslint
ifeq ($(ONLY_CLIENT), 1)
confflags += --disable-server \
--without-ipatests
else
confflags += --enable-server \
--with-ipatests
endif
gentarball:
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 \
debian/control.server-bdeps \
debian/control.common \
debian/control.server \
> debian/control
endif
override_dh_clean: gencontrol
dh_clean
rm -f po/*.gmo po/Makefile.hack po/POTFILES.in 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
override_dh_auto_configure: gencontrol
dh_auto_configure -- $(confflags)
override_dh_auto_test:
override_dh_auto_install:
dh_auto_install --max-parallel=1
ifneq ($(ONLY_CLIENT), 1)
chmod 755 $(DESTDIR)/usr/lib/ipa/certmonger/*
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
endif
mkdir -p $(DESTDIR)/usr/share/bash-completion/completions
mv $(DESTDIR)/etc/bash_completion.d/ipa $(DESTDIR)/usr/share/bash-completion/completions
find $(CURDIR)/debian/tmp -name "*.la" -type f -exec rm -f "{}" \;
find $(CURDIR)/debian/tmp -name '*.py[c,o]' -exec rm '{}' ';'
find $(CURDIR)/debian/tmp -name "*.mo" -type f -exec chmod -x "{}" \;
find $(CURDIR)/debian/tmp -wholename '*/dist-packages/*/install_files.txt' -exec rm '{}' \;
find debian/tmp ! -name '*.pyc' -a ! -name '*.pyo' -a \
-type f -exec grep -qsm1 '^
-exec sed -i -e '1 s|^
ifeq ($(ONLY_CLIENT), 0)
rm -r $(CURDIR)/debian/tmp/usr/lib/python3/dist-packages/ipasphinx*
endif
override_dh_missing:
dh_missing --fail-missing
ifneq ($(ONLY_CLIENT), 1)
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
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
override_dh_gencontrol:
dh_gencontrol -- \
-Vlib:Depends=$(shell dpkg-query -W -f '$${Depends}' librpm-dev \
| sed -E 's/.*(librpm[[:alnum:].-]+).*/\1/')
%:
dh $@ --with python3
|