summaryrefslogtreecommitdiffstats
path: root/meta
diff options
context:
space:
mode:
Diffstat (limited to 'meta')
-rw-r--r--meta/recipes-extended/cups/cups.inc20
-rw-r--r--meta/recipes-extended/cups/cups/cups.path8
-rw-r--r--meta/recipes-extended/cups/cups/cups.service10
-rw-r--r--meta/recipes-extended/cups/cups/cups.socket8
4 files changed, 45 insertions, 1 deletions
diff --git a/meta/recipes-extended/cups/cups.inc b/meta/recipes-extended/cups/cups.inc
index 162b3fd844..fbdc48eab1 100644
--- a/meta/recipes-extended/cups/cups.inc
+++ b/meta/recipes-extended/cups/cups.inc
@@ -8,15 +8,20 @@ SRC_URI = "http://www.cups.org/software/${PV}/${BP}-source.tar.bz2 \
8 file://0001-don-t-try-to-run-generated-binaries.patch \ 8 file://0001-don-t-try-to-run-generated-binaries.patch \
9 file://cups_serverbin.patch \ 9 file://cups_serverbin.patch \
10 file://cups-no-gcrypt.patch \ 10 file://cups-no-gcrypt.patch \
11 file://cups.socket \
12 file://cups.path \
13 file://cups.service \
11 " 14 "
12 15
13LEAD_SONAME = "libcupsdriver.so" 16LEAD_SONAME = "libcupsdriver.so"
14 17
15inherit autotools-brokensep binconfig useradd 18inherit autotools-brokensep binconfig useradd systemd
16 19
17USERADD_PACKAGES = "${PN}" 20USERADD_PACKAGES = "${PN}"
18GROUPADD_PARAM_${PN} = "--system lpadmin" 21GROUPADD_PARAM_${PN} = "--system lpadmin"
19 22
23SYSTEMD_SERVICE_${PN} = "cups.socket cups.path cups.service"
24
20PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \ 25PACKAGECONFIG ??= "${@bb.utils.contains('DISTRO_FEATURES', 'zeroconf', 'avahi', '', d)} \
21 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}" 26 ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', '', d)}"
22PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi" 27PACKAGECONFIG[avahi] = "--enable-avahi,--disable-avahi,avahi"
@@ -71,6 +76,19 @@ fakeroot do_install () {
71 # Remove /var/run from package as cupsd will populate it on startup 76 # Remove /var/run from package as cupsd will populate it on startup
72 rm -fr ${D}/${localstatedir}/run 77 rm -fr ${D}/${localstatedir}/run
73 rmdir ${D}/${libdir}/${BPN}/driver 78 rmdir ${D}/${libdir}/${BPN}/driver
79
80 # Remove sysinit script and symlinks if sysvinit is not in DISTRO_FEATURES
81 if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','false','true',d)}; then
82 rm -rf ${D}${sysconfdir}/init.d/
83 rm -rf ${D}${sysconfdir}/rc*
84 fi
85
86 # Install systemd unit files
87 install -d ${D}${systemd_unitdir}/system
88 install -m 0644 ${WORKDIR}/cups.socket ${D}${systemd_unitdir}/system
89 install -m 0644 ${WORKDIR}/cups.path ${D}${systemd_unitdir}/system
90 install -m 0644 ${WORKDIR}/cups.service ${D}${systemd_unitdir}/system
91 sed -i -e 's,@SBINDIR@,${sbindir},g' ${D}${systemd_unitdir}/system/cups.service
74} 92}
75 93
76python do_package_append() { 94python do_package_append() {
diff --git a/meta/recipes-extended/cups/cups/cups.path b/meta/recipes-extended/cups/cups/cups.path
new file mode 100644
index 0000000000..de8cc57c27
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups.path
@@ -0,0 +1,8 @@
1[Unit]
2Description=CUPS Printer Service Spool
3
4[Path]
5PathExistsGlob=/var/spool/cups/d*
6
7[Install]
8WantedBy=multi-user.target
diff --git a/meta/recipes-extended/cups/cups/cups.service b/meta/recipes-extended/cups/cups/cups.service
new file mode 100644
index 0000000000..7d3e839867
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups.service
@@ -0,0 +1,10 @@
1[Unit]
2Description=CUPS Printing Service
3
4[Service]
5ExecStart=@SBINDIR@/cupsd -f
6PrivateTmp=true
7
8[Install]
9Also=cups.socket cups.path
10WantedBy=printer.target
diff --git a/meta/recipes-extended/cups/cups/cups.socket b/meta/recipes-extended/cups/cups/cups.socket
new file mode 100644
index 0000000000..33148705d6
--- /dev/null
+++ b/meta/recipes-extended/cups/cups/cups.socket
@@ -0,0 +1,8 @@
1[Unit]
2Description=CUPS Printing Service Sockets
3
4[Socket]
5ListenStream=/var/run/cups/cups.sock
6
7[Install]
8WantedBy=sockets.target