1 ###############################################################################
3 # IPFire.org - A linux based firewall #
4 # Copyright (C) 2007, 2008 Michael Tremer & Christian Schmidt #
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. #
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. #
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/>. #
19 ###############################################################################
21 ###############################################################################
23 ###############################################################################
25 include $(PKGROOT)/Include
31 PKG_MAINTAINER = Stefan Schantl <stefan.schantl@ipfire.org>
32 PKG_GROUPS = System/Base
33 PKG_URL = http://www.freedesktop.org/wiki/Software/systemd
35 PKG_SUMMARY = A System and Service Manager.
37 PKG_BUILD_DEPS+= audit-devel automake autoconf cryptsetup-luks-devel dbus-devel \
38 libcap-devel libselinux-devel libtool libudev-devel pam-devel
40 # systemd-analyze requires python-cairo + python-dbus
41 PKG_DEPS-systemd = dbus python-cairo python-dbus
43 define PKG_DESCRIPTION
44 systemd is a system and service manager for Linux, compatible with \
45 SysV and LSB init scripts.
48 PKG_CONFLICTS += upstart
50 PKG_TARBALL = $(THISAPP).tar.gz
52 PKG_PACKAGES += $(PKG_NAME)-units $(PKG_NAME)-devel
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.
59 define PKG_FILES-systemd-units
62 /etc/bash_completion.d/systemctl-bash-completion.sh
66 /usr/share/man/man1/systemctl.*
69 PKG_PREREQUIRES-systemd += systemd-units
72 /bin/systemd-machine-id-setup > /dev/null 2>&1
73 /bin/systemctl daemon-reexec > /dev/null 2>&1
76 CONFIGURE_OPTIONS += \
78 --libexecdir=/usr/lib \
81 --with-sysvinit-path= \
82 --with-sysvrcd-path= \
83 --with-udevrulesdir=/lib/udev/rules.d/ \
84 --with-pamlibdir=/lib/security
86 define STAGE_PREPARE_CMDS
87 cd $(DIR_APP) && ./autogen.sh ac
91 cd $(DIR_APP) && make check
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
103 # Create empty machine-id file.
104 touch $(BUILDROOT)/etc/machine-id
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/
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
118 # Remove runlevel targets and graphical.target
119 rm -rfv $(BUILDROOT)/lib/systemd/system/runlevel*
120 rm -rfv $(BUILDROOT)/lib/systemd/system/graphical.target
122 # Set default target to multi-user
123 cd $(BUILDROOT)/lib/systemd/system && ln -svf multi-user.target default.target
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
134 # Remove tmpfile for X11
135 rm -rfv $(BUILDROOT)/usr/lib/tmpfiles.d/x11.conf
137 # Remove unneeded symlink for xdg
138 rm -rfv $(BUILDROOT)/etc/xdg/systemd