-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlsb-appchk-python.spec.sed
More file actions
138 lines (111 loc) · 4.41 KB
/
lsb-appchk-python.spec.sed
File metadata and controls
138 lines (111 loc) · 4.41 KB
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
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
# %{ver}, %{rel}, %{lsbversion} are provided by the Makefile
%define ver @VERSION@
%define rel @RELEASE@
%define lsbversion @LSBVERSION@
%define basedir /opt/lsb
Summary: LSB Python Application Checker
Name: lsb-appchk-python
Version: %{ver}
Release: %{rel}
License: Artistic
Group: Development/Tools
Source: %{name}-%{version}.tar.gz
Source1: tetj.py
Source2: lsb-python-modules.list
URL: http://www.linuxbase.org/test
#Prefix: %{_prefix}
BuildRoot: %{_tmppath}/%{name}-root
AutoReqProv: no
BuildArch: noarch
%description
This is the official package version of the LSB Python Application Test.
Heavy lifting is done by Python's modulefinder module, using some ideas
from http://www.tarind.com/depgraph.html.
This package bundles a modified version of modulfinder named lsb_modulefinder,
as well as a modified dis.py and copies of opcode.py and types.py from Python
2.4.
#==================================================
%prep
%setup -q
# (sb) set the default version we'll test against (from the Makefile)
sed -i "s|lsb_version = '4.0'|lsb_version = '%{lsbversion}'|g" source/lsbappchk.py
# (sb) and the build version in the binary
sed -i 's|@BUILDVERSION@|%{ver}|g' source/lsbappchk.py
#==================================================
%build
# nothing to do here
#==================================================
%install
rm -rf ${RPM_BUILD_ROOT}
mkdir -p ${RPM_BUILD_ROOT}%{basedir}/bin
mkdir -p ${RPM_BUILD_ROOT}%{basedir}/share/appchk
cp -p source/lsbappchk.py ${RPM_BUILD_ROOT}%{basedir}/bin
cp -p source/lsb_modulefinder.py ${RPM_BUILD_ROOT}%{basedir}/share/appchk
for module in modulefinder dis opcode types; do
cp -p source/lsb_$module.py ${RPM_BUILD_ROOT}%{basedir}/share/appchk
done
cp -p %{SOURCE1} ${RPM_BUILD_ROOT}%{basedir}/share/appchk
cp -p %{SOURCE2} ${RPM_BUILD_ROOT}%{basedir}/share/appchk
# VERSION file for the journal
cat > VERSION.lsbappchk.py << EOF
%{name} %{version}-%{rel} (noarch)
EOF
cp VERSION.lsbappchk.py ${RPM_BUILD_ROOT}%{basedir}/share/appchk
# license files
install -d ${RPM_BUILD_ROOT}%{basedir}/doc/%{name}
for license in Artistic LICENSE.txt; do
cp source/$license ${RPM_BUILD_ROOT}%{basedir}/doc/%{name}
done
# man page
install -d ${RPM_BUILD_ROOT}%{basedir}/man/man1
cp doc/lsbappchk.py.1 ${RPM_BUILD_ROOT}%{basedir}/man/man1
# bug 2509 - unpackaged .pyc/.pyo files on some build platforms
find ${RPM_BUILD_ROOT}%{basedir} -name '*.pyc' | xargs rm -f
find ${RPM_BUILD_ROOT}%{basedir} -name '*.pyo' | xargs rm -f
#==================================================
%clean
if [ ! -z "${RPM_BUILD_ROOT}" -a "${RPM_BUILD_ROOT}" != "/" ]; then
rm -rf ${RPM_BUILD_ROOT}
fi
#==================================================
%files
%defattr(-,root,root)
/opt/lsb/bin/lsbappchk.py
%dir /opt/lsb/share/appchk
/opt/lsb/share/appchk/*
%dir /opt/lsb/doc/%{name}
/opt/lsb/doc/%{name}/*
/opt/lsb/man/man1/lsbappchk.py.1
#==================================================
%changelog
* Fri Jan 07 2011 Stew Benedict <stewb@linux-foundation.org>
- add support for deprecated modules (don't have any yet, but perl does)
* Tue Feb 03 2009 Stew Benedict <stewb@linux-foundation.org>
- drop lsb-tet3-lite requires
* Fri Dec 19 2008 Stew Benedict <stewb@linux-foundation.org>
- add manpage
* Wed Jul 02 2008 Stew Benedict <stewb@linux-foundation.org>
- Lose /opt/lsb/lib to co-exist with multiversion sdk
* Wed Jun 04 2008 Stew Benedict <stewb@linux-foundation.org>
- add multiversion support (bug 2098)
* Tue Apr 15 2008 Stew Benedict <stewb@linux-foundation.org>
- package/use lsb_modulefinder based on modulefinder (bug 1881)
- make lsbappchk.py LSB compliant (drop md5 module, use system python)
- make lsb_modulefinder LSB compliant:
replace "new" with "types", drop getopt dependency
bundle modified lsb_opcode, lsb_types, lsb_dis
- include Python LICENSE.txt for our borrowed modules
* Mon Feb 18 2008 Stew Benedict <stewb@linux-foundation.org>
- We generate lsb-python-modules.list from the specdb now
* Mon Dec 03 2007 Stew Benedict <stewb@linux-foundation.org>
- Add license file
* Sat Dec 1 2007 Mats Wichmann <mats@linux-foundation.org>
- renamed package to lsb-appchk-python from lsbappchk-python (convention)
* Tue Nov 27 2007 Stew Benedict <stewb@linux-foundation.org>
- fix journal issues (bug 1782)
- use tetj.py from misc-test
* Tue Jul 10 2007 Stew Benedict <stewb@linux-foundation.org>
- _foo -> foo, add os, re, string
- bump to release 2
* Tue Jun 03 2007 Stew Benedict <stewb@linux-foundation.org>
- initial packaging