-
Notifications
You must be signed in to change notification settings - Fork 0
/
testrpm2.1.0-1.spec
56 lines (44 loc) · 1.34 KB
/
testrpm2.1.0-1.spec
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
Summary: A second test install rpm to test rpm installing
Name: testrpm2
Version: 1.0
Release: 1
License: GPL v2.0
URL: https://github.com/tdawson/testrpm
BuildArch: noarch
%description
This is a second rpm to test how rpm's install.
This specifically tests the triggers.
%pre
echo "%name-%version-%release : PRE : \$1=$1"
%post
echo "%name-%version-%release : POST : \$1=$1"
%preun
echo "%name-%version-%release : PREUN : \$1=$1"
if [ "$1" -eq 0 ] ; then
echo " We are the last rpm, we should really run our script"
fi
if [ "$1" -ge 1 ] ; then
echo " We are not the last rpm, run our script with care"
fi
%postun
echo "%name-%version-%release : POSTUN : \$1=$1"
if [ "$1" -eq 0 ] ; then
echo " We are the last rpm, we should really run our script"
fi
if [ "$1" -ge 1 ] ; then
echo " We are not the last rpm, run our script with care"
fi
%pretrans
echo "%name-%version-%release : PRETRANS : \$1=$1"
%posttrans
echo "%name-%version-%release : POSTTRANS : \$1=$1"
%triggerin -- testrpm2
echo "%name-%version-%release : TRIGGERIN : testrpm2 : \$1=$1 \$2=$2"
%triggerun -- testrpm2
echo "%name-%version-%release : TRIGGERUN : testrpm2 : \$1=$1 \$2=$2"
%triggerpostun -- testrpm2
echo "%name-%version-%release : TRIGGERPOSTUN : testrpm2 : \$1=$1 \$2=$2"
%files
%changelog
* Wed Sep 19 2018 Troy Dawson <tdawson@redhat.com> 1.0-1
- Initial check in