Browse files

Cleaned up packaging

* Merged doc with main package.
* Not generating pdf anymore, HTML doc is better and cross-referenced anyway
  and the PDF generation was too dependent on LaTeX distributions which caused
  endless issues on several systems.
* Renamed redhat/ into rpm/, as we also try to aim for SuSe compat, so the old
  name wasn't making sense anymore.
* Added install prefix explicitely to specfile, needed on OpenSuSe, whose
  default is /usr/local instead of /usr
  • Loading branch information...
tramjoe committed Oct 18, 2011
1 parent 2a819bd commit 1cb65288054e416909616a8746628ca80617a395
Showing with 11 additions and 36 deletions.
  1. +4 −4 Makefile
  2. +2 −2 README
  3. +0 −6 debian/control
  4. +1 −0 debian/
  5. +0 −4 debian/
  6. +1 −4 debian/rules
  7. +3 −16 {redhat → rpm}/python-rtslib.spec.tmpl
@@ -21,7 +21,7 @@ all:
@echo "Usage:"
@echo " make deb - Builds debian packages."
- @echo " make rpm - Builds redhat packages."
+ @echo " make rpm - Builds rpm packages."
@echo " make release - Generates the release tarball."
@echo " make clean - Cleanup the local repository build files."
@@ -39,7 +39,7 @@ clean:
@rm -frv debian/${NAME}-doc/ debian/python2.5-${NAME}/
@rm -frv debian/python2.6-${NAME}/ debian/python-${NAME}/
@rm -frv results
- @rm -fv redhat/*.spec *.spec redhat/sed* sed*
+ @rm -fv rpm/*.spec *.spec rpm/sed* sed*
@rm -frv ${NAME}-*
@echo "Finished cleanup."
@@ -60,11 +60,11 @@ build/release-stamp:
@echo "Generating rpm specfile from template..."
@cd build/${NAME}-${VERSION}; \
- for spectmpl in redhat/*.spec.tmpl; do \
+ for spectmpl in rpm/*.spec.tmpl; do \
sed -i "s/Version:\( *\).*/Version:\1${VERSION}/g" $${spectmpl}; \
mv $${spectmpl} $$(basename $${spectmpl} .tmpl); \
done; \
- rm -r redhat
+ rm -r rpm
@echo "Generating rpm changelog..."
@for commit in $$(git log --date=iso | grep -e ^commit -e ^Date: \
| tr -d '\n' | sed 's/commit /\n/g' | sed 's/Date: //g' \
@@ -27,5 +27,5 @@ git://
It is useful for developing 3rd-party applications, as well as serving as a
foundation for RisingTide Systems userspace tools.
-For more information, see the rtslib API reference, available in both html
-and pdf formats as a separate package.
+For more information, see the rtslib API reference, available in html
+format as a separate package.
@@ -11,9 +11,3 @@ Depends: python (>= 2.5)|python2.5|python2.6, python-configobj, python-netifaces
Suggests: rtslib-doc
Conflicts: rtsadmin-frozen
Description: RisingTide Systems generic SCSI target API in python.
-Package: rtslib-doc
-Section: doc
-Architecture: all
-Recommends: iceweasel | www-browser
-Description: RisingTide Systems generic SCSI target API documentation.
@@ -1,2 +1,3 @@
@@ -1,4 +0,0 @@
@@ -36,10 +36,7 @@ build-stamp:
--no-compile --install-purelib $(install_dir)/lib/rtslib \
--install-scripts $(install_dir)/bin
echo "2.5, 2.6" > $(install_dir)/lib/rtslib/.version
- mkdir -p $(build_dir) doc/pdf
- cd $(build_dir); epydoc --no-sourcecode --pdf -n $(name) \
- --exclude configobj ../$(name)/*.py
- cp $(build_dir)/pdf/api.pdf doc/pdf/$(name)_API_Documentation.pdf
+ mkdir -p $(build_dir) doc
cd $(build_dir); epydoc --no-sourcecode --html -n $(name) \
--exclude configobj ../$(name)/*.py
sed -i "s/<\?/<!/g" $(build_dir)/html/*.html
@@ -17,30 +17,20 @@ Vendor: RisingTide Systems
API for RisingTide Systems generic SCSI target.
-%package doc
-Summary: PDF and HTML API reference for python-rtslib.
-Group: Documentation
-BuildRequires: epydoc
-%description doc
-PDF and HTML API reference for python-rtslib.
%setup -q -n %{oname}-%{version}
%{__python} build
-mkdir -p doc/pdf
-epydoc --no-sourcecode --pdf -n %{oname} --exclude configobj %{oname}/*.py
-mv pdf/api.pdf doc/pdf/%{oname}_API_Documentation.pdf
+mkdir -p doc
epydoc --no-sourcecode --html -n %{oname} --exclude configobj %{oname}/*.py
sed -i "s/<\?/<!/g" html/*.html
sed -i "s/\?>/>/g" html/*.html
mv html doc/
rm -rf %{buildroot}
-%{__python} install --skip-build --root %{buildroot}
+%{__python} install --skip-build --root %{buildroot} --prefix usr
mkdir -p %{buildroot}/var/target/fabric
cp specs/* %{buildroot}/var/target/fabric
mkdir -p %{buildroot}/usr/share/doc/python-rtslib-doc-%{version}
@@ -53,10 +43,7 @@ rm -rf %{buildroot}
-%files doc

0 comments on commit 1cb6528

Please sign in to comment.