source: trunk/debathena/config/pam-config/debian/rules @ 25594

Revision 25594, 3.8 KB checked in by jdreed, 12 years ago (diff)
In pam-config: * Set XDG_CACHE_HOME to something on local disk (Trac: #1109 and #1162)
  • Property svn:executable set to *
RevLine 
[22685]1#!/usr/bin/make -f
2
3pam_types = account auth session password
4pam_krb5_auth_opts = use_authtok
5pam_krb5_passwd_opts = use_authtok
6
[22875]7DEB_DIVERT_EXTENSION = .debathena
8
[23230]9pam_auth_update = $(shell hash pam-auth-update 2>/dev/null && echo yes)
10
[24179]11KRB5_VERSION = $(shell dpkg-query -W -f '$${Version}' krb5-clients)
12HAVE_KRB4 = $(shell dpkg --compare-versions $(KRB5_VERSION) '<<' '1.7~' && echo y)
13
[23230]14ifeq ($(pam_auth_update),)
15    DEB_TRANSFORM_FILES_debathena-pam-config += \
16        $(patsubst %,/etc/pam.d/common-%.debathena,$(pam_types))
17
18    ifneq ($(wildcard /usr/share/pam/common-auth),)
19        DEB_CHECK_FILES_SOURCE_/etc/pam.d/common-auth.debathena = /usr/share/pam/common-auth
20        DEB_CHECK_FILES_SOURCE_/etc/pam.d/common-session.debathena = /usr/share/pam/common-session
21        DEB_CHECK_FILES_SOURCE_/etc/pam.d/common-account.debathena = /usr/share/pam/common-account
22        DEB_CHECK_FILES_SOURCE_/etc/pam.d/common-password.debathena = /usr/share/pam/common-password
23    endif
24endif
25
[22882]26ifneq ($(wildcard /etc/pam.d/sshd),)
27    PAM_SSHD = /etc/pam.d/sshd.debathena
28    DEB_TRANSFORM_SCRIPT_$(PAM_SSHD) = debian/transform_ssh.debathena
29else
30    PAM_SSHD = /etc/pam.d/ssh.debathena
31endif
32
[22922]33DEB_TRANSFORM_FILES_debathena-pam-config += \
[22685]34        /etc/pam.d/gdm.debathena \
[22882]35        $(PAM_SSHD) \
[22875]36        /etc/pam.d/login.debathena
37
38DEB_DIVERT_FILES_debathena-pam-config += \
[22685]39        /etc/security/access.conf.debathena
[22875]40
[24065]41DEB_REMOVE_FILES_debathena-pam-config += \
[24885]42        /usr/share/pam-configs/krb5 \
[24887]43        /usr/share/pam-configs/afs-session
[24065]44
[22685]45include /usr/share/cdbs/1/rules/debhelper.mk
[22922]46include /usr/share/cdbs/1/rules/config-package.mk
[22685]47
[24465]48DEB_INSTALL_DOCS_debathena-pam-config = debian/README.pam-afs-session
49
[23230]50ifneq ($(pam_auth_update),)
51install/debathena-pam-config::
52        install -D -m 644 debian/athena-session-tmpdir-mktemp.pam-config \
53          $(DEB_DESTDIR)/usr/share/pam-configs/athena-session-tmpdir-mktemp
[25594]54        install -D -m 644 debian/xdg-cache-home-mktemp.pam-config \
55          $(DEB_DESTDIR)/usr/share/pam-configs/xdg-cache-home-mktemp
[24065]56        install -D -m 644 debian/libpam-krb5.pam-config \
57          $(DEB_DESTDIR)/usr/share/pam-configs/krb5.debathena
[24443]58        install -D -m 644 debian/libpam-afs-session.pam-config \
[24888]59          $(DEB_DESTDIR)/usr/share/pam-configs/afs-session.debathena
[23230]60debathena-pam-config-substvars:
61        ( \
62          echo -n "debathena-pam-config-depends="; \
63          echo -n "libpam-runtime (>= 1.0.1-4ubuntu1),"; \
[24065]64          echo -n "libpam-krb5,"; \
[24179]65          if [ "$(HAVE_KRB4)" = "y" ]; then \
66            echo -n "libpam-krb524 (>= 1.3-0debathena3~),"; \
67          fi; \
[24443]68          echo -n "libpam-afs-session,"; \
[23233]69          echo -n "libpam-debathena-home-type (>= 1.1-0debathena2~),"; \
[23686]70          echo \
[23230]71        ) >>debian/debathena-pam-config.substvars
72else
73debathena-pam-config-substvars:
74        ( \
75          echo -n "debathena-pam-config-depends="; \
76          echo -n "libpam-krb5,"; \
[24179]77          if [ "$(HAVE_KRB4)" = "y" ]; then \
78            echo -n "libpam-krb524,"; \
79          fi; \
[24443]80          echo -n "libpam-afs-session,"; \
[23230]81          echo -n "libpam-debathena-home-type,"; \
[23686]82          echo \
[23230]83        ) >>debian/debathena-pam-config.substvars
84endif
85
86binary-predeb/debathena-pam-config:: debathena-pam-config-substvars
87
[22882]88ifneq ($(wildcard /etc/pam.d/sshd),)
89debian-divert/debathena-pam-config::
[23641]90        (echo "if [ \"\$$1\" = configure ] && dpkg-divert --list /etc/pam.d/ssh | grep -xFq 'diversion of /etc/pam.d/ssh to /etc/pam.d/ssh.debathena-orig by $(cdbs_curpkg)'; then"; \
[22882]91        echo "    undivert_unlink /etc/pam.d/ssh"; \
92        echo "fi") >> $(CURDIR)/debian/$(cdbs_curpkg).postinst.debhelper
93endif
94
[22875]95common-build-indep:: debian/access.conf.debathena
[22685]96
[22761]97LSB_ID = $(shell lsb_release --short --id)
[22875]98debian/access.conf.debathena: $(call debian_check_files,/etc/security/access.conf)
[22761]99ifeq ($(LSB_ID), Debian)
100        (cat $<; sed 's/root admin /root /' debian/access.conf.append) > $@
101else
102    ifeq ($(LSB_ID), Ubuntu)
[22685]103        cat $< debian/access.conf.append > $@
[22761]104    else
105        $(error Unrecognized distribution ID $(LSB_ID).)
106    endif
107endif
[22685]108
109clean::
[22875]110        rm -f debian/access.conf.debathena
Note: See TracBrowser for help on using the repository browser.