Summary: Runs postinstall scripts on first boot of the target device Name: run-postinsts Version: 1.0 Release: r10 License: MIT Group: devel Packager: Poky BuildRequires: initscripts BuildRequires: systemd-systemctl-native BuildRequires: update-rc.d Requires: /bin/sh Requires(post): /bin/sh Requires(preun): /bin/sh Requires(postun): /bin/sh Recommends: update-rc.d %description Runs postinstall scripts on first boot of the target device %package -n run-postinsts-src Summary: Runs postinstall scripts on first boot of the target device - Source files License: MIT Group: devel %description -n run-postinsts-src Runs postinstall scripts on first boot of the target device This package contains sources for debugging purposes. %package -n run-postinsts-dbg Summary: Runs postinstall scripts on first boot of the target device - Debugging files License: MIT Group: devel %description -n run-postinsts-dbg Runs postinstall scripts on first boot of the target device This package contains ELF symbols and related sources for debugging purposes. %package -n run-postinsts-staticdev Summary: Runs postinstall scripts on first boot of the target device - Development files (Static Libraries) License: MIT Group: devel Requires: run-postinsts-dev = 1.0-r10 %description -n run-postinsts-staticdev Runs postinstall scripts on first boot of the target device This package contains static libraries for software development. %package -n run-postinsts-dev Summary: Runs postinstall scripts on first boot of the target device - Development files License: MIT Group: devel Requires: run-postinsts = 1.0-r10 Recommends: initscripts-dev Recommends: update-rc.d-dev %description -n run-postinsts-dev Runs postinstall scripts on first boot of the target device This package contains symbolic links, header files, and related items necessary for software development. %package -n run-postinsts-doc Summary: Runs postinstall scripts on first boot of the target device - Documentation files License: MIT Group: doc %description -n run-postinsts-doc Runs postinstall scripts on first boot of the target device This package contains documentation. %package -n run-postinsts-locale Summary: Runs postinstall scripts on first boot of the target device License: MIT Group: devel %description -n run-postinsts-locale Runs postinstall scripts on first boot of the target device %post # run-postinsts - postinst #!/bin/sh set -e if [ -n "$D" -o ! -d /run/systemd/system ] && type update-rc.d >/dev/null 2>/dev/null; then if [ -n "$D" ]; then OPT="-r $D" else OPT="-s" fi update-rc.d $OPT run-postinsts start 99 S . fi if type systemctl >/dev/null 2>/dev/null; then OPTS="" if [ -n "$D" ]; then OPTS="--root=$D" fi if [ "enable" = "enable" ]; then for service in run-postinsts.service; do systemctl ${OPTS} enable "$service" done fi if [ -z "$D" ]; then systemctl daemon-reload systemctl preset run-postinsts.service if [ "enable" = "enable" ]; then systemctl --no-block restart run-postinsts.service fi fi fi %preun # run-postinsts - prerm #!/bin/sh if [ "$1" = "0" ] ; then set -e if [ -n "$D" -o ! -d /run/systemd/system ] && [ -z "$D" -a -x "/etc/init.d/run-postinsts" ]; then /etc/init.d/run-postinsts stop || : fi if type systemctl >/dev/null 2>/dev/null; then if [ -z "$D" ]; then systemctl stop run-postinsts.service systemctl disable run-postinsts.service fi fi fi %postun # run-postinsts - postrm #!/bin/sh if [ "$1" = "0" ] ; then set -e if [ -n "$D" -o ! -d /run/systemd/system ] && type update-rc.d >/dev/null 2>/dev/null; then if [ -n "$D" ]; then OPT="-f -r $D" else OPT="-f" fi update-rc.d $OPT run-postinsts remove fi fi %files %defattr(-,-,-,-) %dir "/etc" %dir "/lib" %dir "/usr" %dir "/etc/init.d" "/etc/init.d/run-postinsts" %dir "/lib/systemd" %dir "/lib/systemd/system-preset" %dir "/lib/systemd/system" "/lib/systemd/system-preset/98-run-postinsts.preset" "/lib/systemd/system/run-postinsts.service" %dir "/usr/sbin" "/usr/sbin/run-postinsts" %files -n run-postinsts-dbg %defattr(-,-,-,-) %files -n run-postinsts-dev %defattr(-,-,-,-)