packages: springenwerk/springenwerk.spec - hack: install springenwerk.py as...

glen glen at pld-linux.org
Tue Jan 25 18:34:18 CET 2011


Author: glen                         Date: Tue Jan 25 17:34:18 2011 GMT
Module: packages                      Tag: HEAD
---- Log message:
- hack: install springenwerk.py as library, and create wrapper for gui to fix import

---- Files affected:
packages/springenwerk:
   springenwerk.spec (1.2 -> 1.3) 

---- Diffs:

================================================================
Index: packages/springenwerk/springenwerk.spec
diff -u packages/springenwerk/springenwerk.spec:1.2 packages/springenwerk/springenwerk.spec:1.3
--- packages/springenwerk/springenwerk.spec:1.2	Tue Jan 25 18:07:41 2011
+++ packages/springenwerk/springenwerk.spec	Tue Jan 25 18:34:13 2011
@@ -2,7 +2,7 @@
 Summary:	Cross Site Scripting (XSS) security scanner, written in Python
 Name:		springenwerk
 Version:	0.4.5
-Release:	0.2
+Release:	0.4
 License:	BSD-like
 Group:		Applications/WWW
 Source0:	http://www.hacktoolrepository.com/files/Web%20applications/Springenwerk/%{name}-%{version}.tar.gz
@@ -34,7 +34,7 @@
 %package gui
 Summary:	Cross Site Scripting (XSS) security scanner - GUI
 Group:		X11/Applications
-Requires:	%{name}-%{version}
+Requires:	%{name} = %{version}-%{release}
 Requires:	python-tkinter
 
 %description gui
@@ -46,11 +46,22 @@
 # add python shebang
 %{__sed} -i -e '1i#!%{__python}' *.py
 
+cat > %{name} <<'EOF'
+#!%{__python}
+import springenwerk
+springenwerk.main()
+EOF
+
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT%{_bindir}
-install -p springenwerk.py $RPM_BUILD_ROOT%{_bindir}/springenwerk
+install -d $RPM_BUILD_ROOT{%{_bindir},%{py_sitescriptdir}}
+install -p springenwerk $RPM_BUILD_ROOT%{_bindir}/springenwerk
 install -p springenwerkgui.py $RPM_BUILD_ROOT%{_bindir}/springenwerkgui
+cp -p springenwerk.py $RPM_BUILD_ROOT%{py_sitescriptdir}
+
+%py_ocomp $RPM_BUILD_ROOT%{py_sitescriptdir}
+%py_comp $RPM_BUILD_ROOT%{py_sitescriptdir}
+%py_postclean
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -59,6 +70,7 @@
 %defattr(644,root,root,755)
 %doc INSTALL LICENCE README
 %attr(755,root,root) %{_bindir}/springenwerk
+%{py_sitescriptdir}/springenwerk.py[co]
 
 %files gui
 %defattr(644,root,root,755)
@@ -70,6 +82,9 @@
 All persons listed below can be reached at <cvs_login>@pld-linux.org
 
 $Log$
+Revision 1.3  2011/01/25 17:34:13  glen
+- hack: install springenwerk.py as library, and create wrapper for gui to fix import
+
 Revision 1.2  2011/01/25 17:07:41  glen
 - setup shebangs
 
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/cgi-bin/cvsweb.cgi/packages/springenwerk/springenwerk.spec?r1=1.2&r2=1.3&f=u



More information about the pld-cvs-commit mailing list