1
# %{ver}, %{rel}, %{name} provided by Makefile
6
# LSB Compliant packages require the following in ~/.rpmmacros
7
#%_binary_payload w9.gzdio
9
Summary: LSB Distribution Testkit Manager
11
# name, ver, rel are passed in from Makefile so we only have to set them one place
15
Source: %{name}-%{version}.src.tgz
17
URL: http://www.linuxfoundation.org/en/Downloads
18
Group: Development/Tools
19
Buildroot: %{_builddir}/%{name}-root
24
LSB Distribution Testkit wraps all the current LSB test suites into a
25
user-friendly "single LSB test suite" with unified test management and
26
analysis capabilities. This facilitates test execution and results analysis
27
thus making the LSB tests more attractive for upstream developers as well as
28
making certification process technically more inviting.
31
if [ ! -x /opt/lsb/bin/lsbcc ] ; then
32
printf "lsbcc not found, required for compilation, aborting\n"
39
# Build ptyshell binary
40
export LSBCC_LSBVERSION=3.1
41
export CC=/opt/lsb/bin/lsbcc
42
#export CFLAGS=-fno-stack-protector
43
cd ptyshell && make clean && make && cd -
46
#[ -d man/man1 ] || mkdir -p man/man1
47
#pod2man utils/lsb-tef.pl man/man1/lsb-tef.pl.1 -r 'The Linux Foundation' -c '' -n lsb-tef.pl
48
#pod2man man/man1/dtk-manager.pod man/man1/dtk-manager.1 -r 'The Linux Foundation' -c '' -n dtk-manager
52
rm -rf $RPM_BUILD_ROOT/opt/lsb/test/manager
53
mkdir -p $RPM_BUILD_ROOT/opt/lsb/test/manager
54
cp -r LICENSE README bin utils webui $RPM_BUILD_ROOT/opt/lsb/test/manager
55
#cp -rf man $RPM_BUILD_ROOT/opt/lsb
56
#rm $RPM_BUILD_ROOT/opt/lsb/man/man1/dtk-manager.pod
57
mkdir -p $RPM_BUILD_ROOT/opt/lsb/test/manager/ptyshell
58
cp ptyshell/ptyshell $RPM_BUILD_ROOT/opt/lsb/test/manager/ptyshell
59
rm -rf $RPM_BUILD_ROOT/var/opt/lsb/test/manager
60
mkdir -p $RPM_BUILD_ROOT/var/opt/lsb/test/manager/manifest
61
cp Manifest $RPM_BUILD_ROOT/var/opt/lsb/test/manager/manifest
62
mkdir -p $RPM_BUILD_ROOT/var/opt/lsb/test/manager/problem_db
63
cp problem_db $RPM_BUILD_ROOT/var/opt/lsb/test/manager/problem_db
64
mkdir -p $RPM_BUILD_ROOT/etc/opt/lsb/test/manager
65
cp config/dtk-server.conf.default $RPM_BUILD_ROOT/etc/opt/lsb/test/manager
70
/var/opt/lsb/test/manager
71
/etc/opt/lsb/test/manager
72
%doc /opt/lsb/test/manager/README
73
#%doc /opt/lsb/man/man1/lsb-tef.pl.1
74
#%doc /opt/lsb/man/man1/dtk-manager.1
77
echo "Installed successfully."
80
if [ ! -x /usr/bin/perl ] ; then
82
echo "Warning: Couldn't find /usr/bin/perl."
83
echo "Perl is required for LSB DTK Manager. Please, install it"
84
echo "using the tools provided by your distro."
89
if ! which lsb_release >/dev/null 2>&1; then
91
echo "Warning: Couldn't find the required tool: lsb_release."
92
echo "lsb_release should be always present for a LSB compliant distro."
93
echo "You could install lsb_release and other LSB components using"
94
echo "the tools provided by your distro."
99
if lsb_release 2>&1 | grep "No LSB modules" >/dev/null 2>&1; then
101
echo "Warning: No LSB modules are available."
102
echo "You could install LSB modules using the tools provided by"
108
if ! which Xvfb >/dev/null 2>&1; then
110
echo "Warning: Couldn't find the required tool: Xvfb (X Virtual Frame Buffer)."
111
echo "Xvfb is required for X11 tests for LSB 3.0 and 3.1. If you are going"
112
echo "to run these tests or to get certified for these LSB versions,"
113
echo "you should install Xvfb using the tools provided by your distribution."
119
echo "__________________________________________________________________________"
122
echo "This tool runs as the root user and installs packages on its own!"
123
echo "Therefore it can do pretty much harm if it gets out of control."
124
echo "We have tried to make the script reasonably safe but there is no warranty."
125
echo "Use it at YOUR OWN RISK only, and only if you know what you are doing."
127
echo "Some setuid and setgid binaries may be generated and left behind after"
128
echo "execution of the test suites (especially if certain tests fail)."
129
echo "You should not install this package on production systems"
130
echo "or in situations where local users are not completely trusted."
132
echo "PLEASE DO NOT RUN IT ON A MACHINE THAT HOLDS IMPORTANT DATA, OR PROVIDES"
133
echo "IMPORTANT SERVICES!"
134
echo "__________________________________________________________________________"
136
echo "LSB Distribution Testkit Manager has been installed to"
137
echo "/opt/lsb/test/manager."
138
if [ $RESULT -ne 0 ]; then
140
echo "There were warnings."
143
echo "Use /opt/lsb/test/manager/bin/lsb-dtk-start.pl to run LSB DTK Manager."
145
echo "Read more info at"
146
echo "http://ispras.linuxfoundation.org/index.php/About_LSB_Distribution_Testkit_Manager"
149
# End of the postinstall script.
152
if [ $1 = "0" -o $1 = "remove" ]; then
153
echo " LSB Distribution Testkit Manager has been uninstalled."
154
if [ -d /var/opt/lsb/test/manager ]; then
155
echo " There are files left in /var/opt/lsb/test/manager. You could delete them all."
160
if [ -e "${RPM_BUILD_ROOT}" -a "${RPM_BUILD_ROOT}" != "/" ]; then
161
rm -rf ${RPM_BUILD_ROOT}