Last active
September 9, 2019 08:05
-
-
Save borisisok/fc8fc9d6180252e4c450d0069517e736 to your computer and use it in GitHub Desktop.
rpm trigger processing example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name: goodby-world | |
Version: 1 | |
Release: 1 | |
Summary: Next to most simple RPM package | |
License: FIXME | |
%description | |
This is my second RPM package, which does nothing. | |
%prep | |
# we have no source, so nothing here | |
%build | |
cat > goodby-world.sh <<EOF | |
#!/usr/bin/bash | |
echo Goodby world | |
EOF | |
%install | |
mkdir -p %{buildroot}/usr/bin/ | |
install -m 755 goodby-world.sh %{buildroot}/usr/bin/goodby-world.sh | |
%files | |
/usr/bin/goodby-world.sh | |
%changelog | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Name: hello-world | |
Version: 1 | |
Release: 1 | |
Summary: Most simple RPM package | |
License: FIXME | |
%description | |
This is my first RPM package, which does nothing. | |
%prep | |
# we have no source, so nothing here | |
%build | |
cat > hello-world.sh <<EOF | |
#!/usr/bin/bash | |
echo Hello world | |
EOF | |
%install | |
mkdir -p %{buildroot}/usr/bin/ | |
install -m 755 hello-world.sh %{buildroot}/usr/bin/hello-world.sh | |
%files | |
/usr/bin/hello-world.sh | |
%triggerin -- goodby-world | |
echo "the world just ended" >> /tmp/trigger | |
%changelog | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment