1 | #!/usr/bin/make -f |
---|
2 | |
---|
3 | GDM_VERSION = $(shell dpkg-query --showformat='$${Version}' --show gdm) |
---|
4 | GDM3_VERSION = $(shell dpkg-query --showformat='$${Version}' --show gdm3) |
---|
5 | ifneq ($(GDM3_VERSION),) |
---|
6 | gdm = gdm3 |
---|
7 | NEW_GDM = y |
---|
8 | else |
---|
9 | gdm = gdm |
---|
10 | NEW_GDM = $(shell dpkg --compare-versions $(GDM_VERSION) ge '2.25.2~' && echo y) |
---|
11 | endif |
---|
12 | CDBS_BUILD_DEPENDS += $(gdm) |
---|
13 | |
---|
14 | binary-predeb/debathena-gdm-config:: debathena-gdm-config-substvars |
---|
15 | debathena-gdm-config-substvars:: |
---|
16 | echo "debathena-gdm=$(gdm)" \ |
---|
17 | >> debian/debathena-gdm-config.substvars |
---|
18 | |
---|
19 | ifneq ($(wildcard /etc/gdm/gdm.conf-custom),) |
---|
20 | GDM_CONFFILE = /etc/gdm/gdm.conf-custom.debathena |
---|
21 | DEB_DH_LINK_ARGS_debathena-gdm-config=/etc/gdm/gdm.conf-custom.debathena /etc/gdm/gdm.conf.debathena |
---|
22 | else |
---|
23 | GDM_CONFFILE = /etc/gdm/gdm.conf.debathena |
---|
24 | endif |
---|
25 | |
---|
26 | DEB_DIVERT_EXTENSION = .debathena |
---|
27 | DEB_TRANSFORM_SCRIPT_${GDM_CONFFILE} = debian/transform_gdm.conf.debathena |
---|
28 | DEB_DIVERT_FILES_debathena-gdm-config += \ |
---|
29 | /etc/$(gdm)/PreSession/Default.debathena \ |
---|
30 | /etc/$(gdm)/PostSession/Default.debathena |
---|
31 | DEB_REMOVE_FILES_debathena-gdm-config += \ |
---|
32 | /usr/share/xsessions/ssh.desktop |
---|
33 | |
---|
34 | ifneq ($(NEW_GDM),y) |
---|
35 | DEB_TRANSFORM_FILES_debathena-gdm-config += \ |
---|
36 | ${GDM_CONFFILE} |
---|
37 | DEB_DIVERT_FILES_debathena-gdm-config += \ |
---|
38 | /usr/share/gdm/BuiltInSessions/default.desktop.debathena |
---|
39 | endif |
---|
40 | |
---|
41 | include /usr/share/cdbs/1/rules/debhelper.mk |
---|
42 | include /usr/share/cdbs/1/rules/config-package.mk |
---|
43 | |
---|
44 | common-build-indep:: debathena/distro.svg |
---|
45 | |
---|
46 | debathena/distro.svg: debian/distro.svg.sh |
---|
47 | sh $< > $@ |
---|
48 | |
---|
49 | install/debathena-gdm-config:: |
---|
50 | dh_install debian/PreSession/Default.debathena etc/$(gdm)/PreSession |
---|
51 | dh_install debian/PostSession/Default.debathena etc/$(gdm)/PostSession |
---|
52 | |
---|
53 | ifneq ($(NEW_GDM),y) |
---|
54 | install/debathena-gdm-config:: |
---|
55 | dh_install debian/default.desktop.debathena usr/share/gdm/BuiltInSessions |
---|
56 | else |
---|
57 | install/debathena-gdm-config:: |
---|
58 | dh_install debian/background.jpg usr/share/debathena-gdm-config |
---|
59 | dh_install debian/%gconf-tree.xml var/lib/$(gdm)/.gconf.debathena-gdm-config |
---|
60 | dh_install debian/athena.desktop usr/share/xsessions |
---|
61 | dh_install debian/athena-session usr/bin |
---|
62 | |
---|
63 | install -m 660 debian/gconf.path.debathena debian/$(cdbs_curpkg)/var/lib/$(gdm)/.gconf.path.debathena |
---|
64 | dh_install debian/debathena-branding usr/lib/debathena-branding |
---|
65 | dh_install debian/debathena-branding.glade usr/share/debathena-branding |
---|
66 | dh_install debian/debathena-branding.desktop usr/share/gdm/autostart/LoginWindow |
---|
67 | dh_install debian/debathena-nologin-monitor usr/lib/debathena-nologin-monitor |
---|
68 | dh_install debian/debathena-nologin-monitor.desktop usr/share/gdm/autostart/LoginWindow |
---|
69 | |
---|
70 | debathena-gdm-config-substvars:: |
---|
71 | echo "debathena-gdm-gconf-depends=debathena-gconf2-config (>= 1.8~)" \ |
---|
72 | >> debian/debathena-gdm-config.substvars |
---|
73 | |
---|
74 | install/debathena-gdm-config:: |
---|
75 | dh_gconf --priority 90 |
---|
76 | endif |
---|
77 | |
---|
78 | clean:: |
---|
79 | -rm debathena/distro.svg |
---|