]> git.ipfire.org Git - ipfire-3.x.git/blobdiff - initscripts/initscripts.nm
Add a -debuginfo for every package that is not noarch.
[ipfire-3.x.git] / initscripts / initscripts.nm
index ca0e7af051dd1dc19497248f8cf0065e3c56cfcf..2dc0203e8ce6dac020f4e593012f9f5aae46d3d9 100644 (file)
@@ -6,7 +6,7 @@
 name       = initscripts
 epoch      = 1
 version    = 2.99
-release    = 6
+release    = 11
 
 groups     = Base System/Boot
 url        =
@@ -44,16 +44,8 @@ build
        install
                cd src && make install clean DESTDIR=%{BUILDROOT}
 
-               mkdir -pv %{BUILDROOT}/etc/{init,sysconfig}
-
-               cp -vf %{DIR_SOURCE}/functions %{BUILDROOT}/etc/init/
-
-               for i in %{DIR_SOURCE}/sysconfig/*; do
-                       install -v -m 644 $i %{BUILDROOT}/etc/sysconfig/
-               done
-               chmod -v 755 %{BUILDROOT}/etc/sysconfig/rc.local
-
-               cp -vf %{DIR_SOURCE}/sysctl.conf %{BUILDROOT}/etc
+               # Install rc.local
+               install -v -m 755 %{DIR_SOURCE}/rc.local %{BUILDROT}/etc/rc.local
 
                # Install udev rules
                mkdir -pv %{BUILDROOT}/lib/udev/rules.d/
@@ -76,5 +68,43 @@ packages
                        udev
                        util-linux
                end
+
+               configfiles
+                       /etc/rc.local
+               end
+
+               prerequires = coreutils shadow-utils
+
+               script prein
+                       groupadd -g 22 -r -f utmp
+               end
+
+               script postin
+                       touch /var/log/{b,w}tmp /var/run/utmp
+                       chown root:utmp /var/log/{b,w}tmp /var/run/utmp
+                       chmod 664 /var/log/wtmp /var/run/utmp
+                       chmod 600 /var/log/btmp
+
+                       # Just search for new unit files that were just installed.
+                       /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+
+                       # Enable rc.local as default.
+                       /bin/systemctl --no-reload enable rc-local.service >/dev/null 2>&1 || :
+               end
+
+               # Disable the service that is to be removed and stop it if it is still running.
+               script preun
+                       /bin/systemctl --no-reload disable rc-local.service >/dev/null 2>&1 || :
+                       /bin/systemctl stop rc-local.service >/dev/null 2>&1 || :
+               end
+
+               # Just tell systemd that unitfiles have been removed.
+               script postun
+                       /bin/systemctl daemon-reload >/dev/null 2>&1 || :
+               end
+       end
+
+       package %{name}-debuginfo
+               template DEBUGINFO
        end
 end