]> git.ipfire.org Git - ipfire-3.x.git/blob - pkgs/systemd/systemd.nm
systemd: Require python-cairo.
[ipfire-3.x.git] / pkgs / systemd / systemd.nm
1 ###############################################################################
2 # #
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
5 # #
6 # This program is free software: you can redistribute it and/or modify #
7 # it under the terms of the GNU General Public License as published by #
8 # the Free Software Foundation, either version 3 of the License, or #
9 # (at your option) any later version. #
10 # #
11 # This program is distributed in the hope that it will be useful, #
12 # but WITHOUT ANY WARRANTY; without even the implied warranty of #
13 # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the #
14 # GNU General Public License for more details. #
15 # #
16 # You should have received a copy of the GNU General Public License #
17 # along with this program. If not, see <http://www.gnu.org/licenses/>. #
18 # #
19 ###############################################################################
20
21 ###############################################################################
22 # Definitions
23 ###############################################################################
24
25 include $(PKGROOT)/Include
26
27 PKG_NAME = systemd
28 PKG_VER = 29
29 PKG_REL = 3
30
31 PKG_MAINTAINER = Stefan Schantl <stefan.schantl@ipfire.org>
32 PKG_GROUPS = System/Base
33 PKG_URL = http://www.freedesktop.org/wiki/Software/systemd
34 PKG_LICENSE = GPLv2+
35 PKG_SUMMARY = A System and Service Manager.
36
37 PKG_BUILD_DEPS+= audit-devel automake autoconf cryptsetup-luks-devel dbus-devel \
38 libcap-devel libselinux-devel libtool libudev-devel pam-devel
39
40 # systemd-analyze requires python-cairo + python-dbus
41 PKG_DEPS-systemd = dbus python-cairo python-dbus
42
43 define PKG_DESCRIPTION
44 systemd is a system and service manager for Linux, compatible with \
45 SysV and LSB init scripts.
46 endef
47
48 PKG_CONFLICTS += upstart
49
50 PKG_TARBALL = $(THISAPP).tar.gz
51
52 PKG_PACKAGES += $(PKG_NAME)-units $(PKG_NAME)-devel
53
54 # Package information for systemd-units
55 PKG_SUMMARY-systemd-units = Configuration files, directories and installation tool for systemd.
56 PKG_DESCRIPTION-systemd-units = This package contains all needed configuration files, directories \
57 and installation / configuration tool for systemd.
58
59 define PKG_FILES-systemd-units
60 /etc/systemd/system
61 /etc/tmpfiles.d
62 /etc/bash_completion.d/systemctl-bash-completion.sh
63 /lib/systemd/system
64 /bin/systemctl
65 /bin/systemd-tmpfiles
66 /usr/share/man/man1/systemctl.*
67 endef
68
69 PKG_PREREQUIRES-systemd += systemd-units
70
71 define CONTROL_POSTIN
72 /bin/systemd-machine-id-setup > /dev/null 2>&1
73 /bin/systemctl daemon-reexec > /dev/null 2>&1
74 endef
75
76 CONFIGURE_OPTIONS += \
77 --sysconfdir=/etc \
78 --libexecdir=/usr/lib \
79 --with-rootdir= \
80 --with-distro=other \
81 --with-sysvinit-path= \
82 --with-sysvrcd-path= \
83 --with-udevrulesdir=/lib/udev/rules.d/ \
84 --with-pamlibdir=/lib/security
85
86 define STAGE_PREPARE_CMDS
87 cd $(DIR_APP) && ./autogen.sh ac
88 endef
89
90 define STAGE_TEST
91 cd $(DIR_APP) && make check
92 endef
93
94 define STAGE_INSTALL_CMDS
95 # Create sysv compatible symlinks.
96 -mkdir -pv $(BUILDROOT)/sbin
97 ln -svf ../bin/systemd $(BUILDROOT)/sbin/init
98 ln -svf ../bin/systemctl $(BUILDROOT)/sbin/reboot
99 ln -svf ../bin/systemctl $(BUILDROOT)/sbin/halt
100 ln -svf ../bin/systemctl $(BUILDROOT)/sbin/poweroff
101 ln -svf ../bin/systemctl $(BUILDROOT)/sbin/shutdown
102
103 # Create empty machine-id file.
104 touch $(BUILDROOT)/etc/machine-id
105
106 # Copy locale and console settings
107 -mkdir -pv $(BUILDROOT)/etc
108 cp -vf $(DIR_SOURCE)/locale.conf $(BUILDROOT)/etc/
109 cp -vf $(DIR_SOURCE)/vconsole.conf $(BUILDROOT)/etc/
110
111 # Recreate all targets
112 rm -rfv $(BUILDROOT)/etc/systemd/system/*.target.wants
113 -mkdir -pv $(BUILDROOT)/lib/systemd/system/basic.target.wants
114 -mkdir -pv $(BUILDROOT)/lib/systemd/system/default.target.wants
115 -mkdir -pv $(BUILDROOT)/lib/systemd/system/dbus.target.wants
116 -mkdir -pv $(BUILDROOT)/lib/systemd/system/syslog.target.wants
117
118 # Remove runlevel targets and graphical.target
119 rm -rfv $(BUILDROOT)/lib/systemd/system/runlevel*
120 rm -rfv $(BUILDROOT)/lib/systemd/system/graphical.target
121
122 # Set default target to multi-user
123 cd $(BUILDROOT)/lib/systemd/system && ln -svf multi-user.target default.target
124
125 # Replace absolute symlinks by relative ones.
126 cd $(BUILDROOT)/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/bluetooth.target bluetooth.target
127 cd $(BUILDROOT)/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/local-fs.target local-fs.target
128 cd $(BUILDROOT)/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/printer.target printer.target
129 cd $(BUILDROOT)/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/shutdown.target shutdown.target
130 cd $(BUILDROOT)/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/sockets.target sockets.target
131 cd $(BUILDROOT)/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/sound.target sound.target
132 cd $(BUILDROOT)/usr/lib/systemd/user/ && ln -svf ../../../../lib/systemd/system/swap.target swap.target
133
134 # Remove tmpfile for X11
135 rm -rfv $(BUILDROOT)/usr/lib/tmpfiles.d/x11.conf
136
137 # Remove unneeded symlink for xdg
138 rm -rfv $(BUILDROOT)/etc/xdg/systemd
139 endef
140