extfs: rpm: add test for a custom package.
[midnight-commander.git] / tests / src / vfs / extfs / helpers-list / misc / test.spec
blob04e106cc6ec3c91c1ca3a3e76010286d06b7d0f9
2 # This spec file is used to build the test*.rpm package we use in one of
3 # our tests.
5 # The advantage of using our own custom package, instead of downloading a
6 # random one from the net, is that we get the chance here to define all the
7 # tags our rpm helper is supposed to support.
9 # Build this package with:
11 # $ rpmbuild -bb test.spec
13 # Then create the input for the test with:
15 # $ perl /path/to/rpm2tags.pl ~/rpmbuild/RPMS/noarch/test*.rpm > rpm.custom.input
17 Name: test
18 Summary: Testing
19 Epoch: 1
20 Version: 2.3
21 Release: 4%{?dist}
22 URL: http://example.com
23 Group: Development/System
24 License: MIT
25 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root
26 BuildArch: noarch
27 Conflicts: notest
28 Obsoletes: testing
29 Distribution: Test Distro
30 Packager: Test Packager
31 Vendor: Test Vendor
34 %description
35 Multi-line description field
36 with "double", 'single quotes', and $weird | \characters i\n = i\\t, empty line...
38 ...and a tab: [ ].
40 %install
41 [ "%{buildroot}" != / ] && %{__rm} -rf "%{buildroot}"
42 %{__mkdir_p} %{buildroot}%{_tmppath}
43 echo %{name} > %{buildroot}%{_tmppath}/%{name}.txt
46 %pretrans
47 echo "Pre-transaction script"
50 %pre
51 echo "Pre-installation script"
54 %post
55 echo "Post-installation script"
58 %preun
59 echo "Pre-uninstallation script"
62 %postun
63 echo "Post-uninstallation script"
66 %posttrans
67 echo "Post-transaction script"
70 %verifyscript
71 echo "Verify script"
74 %clean
75 [ "%{buildroot}" != / ] && %{__rm} -rf "%{buildroot}"
78 %files
79 %defattr(-,root,root,-)
80 %{_tmppath}/%{name}.txt
83 %changelog
84 * Fri Dec 30 2016 Jiri Tyr <jiri.tyr at gmail.com> 1:2.3-4
85 - Initial build.