rpms/diveintopython/devel diveintopython.desktop.in, NONE, 1.1 diveintopython-build.xml.patch, 1.1, 1.2 diveintopython.spec, 1.4, 1.5 diveintopython-index.xml.patch, 1.1, NONE diveintopython.desktop, 1.1, NONE diveintopython.png, 1.1, NONE diveintopython.xml.patch, 1.1, NONE make.sh.patch, 1.1, NONE

Marc Wiriadisastra (mwiriadi) fedora-extras-commits at redhat.com
Thu Jan 24 05:23:27 UTC 2008


Author: mwiriadi

Update of /cvs/pkgs/rpms/diveintopython/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv21665/devel

Modified Files:
	diveintopython-build.xml.patch diveintopython.spec 
Added Files:
	diveintopython.desktop.in 
Removed Files:
	diveintopython-index.xml.patch diveintopython.desktop 
	diveintopython.png diveintopython.xml.patch make.sh.patch 
Log Message:
Thanks to Mohd Izhar Firdaus Ismail for the following:
- Major cleanup of spec to be less complex
- Made the packaging less diverted from the generated tree from upstream build script
- Changed desktop file to use pdf mimetype icon as diveintopython.png is corrupted
  even in upstream zip file
- Removed unnecessary patches
- Removed builreq ant as upstream make.sh uses upstream provided jars (we might want to
  use ant from fedora repo, todo: investigate possibility of patching make.sh and adding
  more java buildreqs for this)
- Switched diveintopython to be a metapackage which pulls diveintopython-pdf




--- NEW FILE diveintopython.desktop.in ---
[Desktop Entry]
Encoding=UTF-8
Name=Dive Into Python
Comment=Open Dive Into Python book
Exec=xdg-open @DOCDIR@/pdf/diveintopython.pdf
Icon=gnome-mime-application-pdf
Terminal=false
Type=Application
Categories=Application;Development;

diveintopython-build.xml.patch:

Index: diveintopython-build.xml.patch
===================================================================
RCS file: /cvs/pkgs/rpms/diveintopython/devel/diveintopython-build.xml.patch,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- diveintopython-build.xml.patch	10 Jan 2008 21:00:27 -0000	1.1
+++ diveintopython-build.xml.patch	24 Jan 2008 05:23:18 -0000	1.2
@@ -1,13 +1,8 @@
---- diveintopython-5.4/build.xml	2002-07-28 16:27:46.000000000 +0800
-+++ build.xml	2008-01-04 01:00:53.000000000 +0900
-@@ -3,10 +3,10 @@
- [
- <!ENTITY % version SYSTEM "xml/version.xml">
- %version;
--<!ENTITY common "../common">
--<!ENTITY buildcommon SYSTEM "../common/build_common.xml">
-+<!ENTITY common "xml/common">
-+<!ENTITY buildcommon SYSTEM "xml/common/build_common.xml">
+--- old/build.xml	2008-01-23 23:06:01.000000000 +0800
++++ new/build.xml	2008-01-23 23:06:14.000000000 +0800
+@@ -6,7 +6,7 @@
+ <!ENTITY common "../common">
+ <!ENTITY buildcommon SYSTEM "../common/build_common.xml">
  ]>
 -<project name="diveintopython" default="html" basedir=".">
 +<project name="diveintopython" default="all" basedir=".">


Index: diveintopython.spec
===================================================================
RCS file: /cvs/pkgs/rpms/diveintopython/devel/diveintopython.spec,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- diveintopython.spec	19 Jan 2008 13:08:30 -0000	1.4
+++ diveintopython.spec	24 Jan 2008 05:23:18 -0000	1.5
@@ -1,33 +1,39 @@
 Name:           diveintopython
 Version:        5.4
-Release:        8%{?dist}
+Release:        10%{?dist}
 
 Summary:        Dive into Python - a python book
 
 Group:          Documentation
 License:        GFDL
 URL:            http://www.diveintopython.org
-Source0:        http://www.diveintopython.org/download/%{name}-xml-%{version}.zip
-Source1:        %{name}.png
-Source2:        http://www.diveintopython.org/download/%{name}-common-%{version}.zip
-Source3:        %{name}.desktop
-Patch0:         make.sh.patch
-Patch1:         diveintopython.xml.patch
-Patch2:         diveintopython-build.xml.patch
-Patch3:         diveintopython-index.xml.patch
+Source0:        http://www.diveintopython.org/download/%{name}-common-%{version}.zip
+Source1:        http://www.diveintopython.org/download/%{name}-xml-%{version}.zip
+Source2:        %{name}.desktop.in
+
 BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 BuildArch:      noarch
+Requires:       diveintopython-pdf
+Patch0:         diveintopython-build.xml.patch
 
-BuildRequires:  desktop-file-utils, ant, htmldoc, python, w3m
+BuildRequires:  desktop-file-utils, htmldoc, 
+BuildRequires:  python, w3m
 %if 0%{?fedora} >= 8
-BuildRequires: java-1.7.0-icedtea-devel
+BuildRequires: java-1.7.0-icedtea
 %else
-BuildRequires: java-1.5.0-gcj-devel
+BuildRequires: java-1.5.0-gcj
 %endif
 
 %description
 Dive Into Python is a Python book for experienced programmers.
 
+%package         pdf
+Summary:         Dive into Python - a python book
+Group:           Documentation
+%description     pdf
+Dive Into Python is a Python book for experienced programmers.
+The PDF version
+
 %package         html
 Summary:         Dive into Python - a python book
 Group:           Documentation
@@ -50,93 +56,76 @@
 The text version
 
 %prep 
-%setup -q -a 2 html
-mv %{name}-%{version}/common xml/
-%patch0 -p1
-%patch1 -p1
-%patch2 -p1
-%patch3 -p1
-rm -f make.bat
+%setup -q -b 1
+%patch0 -p1 -b .build-all
+mkdir build
+mv xml make.sh build.xml build/
 
 %build
+pushd build
 /bin/sh make.sh
+popd
 
 %install
 rm -rf $RPM_BUILD_ROOT
+pushd build/dist
+#cleanup unnecessary duplicates
+rm -rf pdf/*.png pdf/*.html pdf/images/
+rm -rf txt/*.html
 
-install -m 0644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/diveintopython.png
-# Install html version
-mkdir -p $RPM_BUILD_ROOT%{_docdir}/diveintopython-html
-pushd dist/html/
-find . -type d -exec mkdir -p $RPM_BUILD_ROOT%{_docdir}/diveintopython-html/'{}'  \;
-for DIR in * ; do
-  find $DIR -type f -exec install -m 0644 '{}' $RPM_BUILD_ROOT%{_docdir}/diveintopython-html/${DIR}/ \;
-done
-install -m 0644 diveintopython.css $RPM_BUILD_ROOT%{_docdir}/diveintopython-html/diveintopython.css
-install -m 0644 history.xml $RPM_BUILD_ROOT%{_docdir}/diveintopython-html/history.xml
-install -m 0644 index.html $RPM_BUILD_ROOT%{_docdir}/diveintopython-html/index.html
-popd
-
-# Install pdf version
-pushd dist/pdf/
-mkdir -p $RPM_BUILD_ROOT%{_docdir}/diveintopython
-find . -type d -exec mkdir -p $RPM_BUILD_ROOT%{_docdir}/diveintopython/'{}'  \;
+#install the files
+find . -type d -exec mkdir -p $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/'{}'  \;
 for DIR in * ; do
-  find $DIR -type f -exec install -m 0644 '{}' $RPM_BUILD_ROOT%{_docdir}/diveintopython/${DIR}/ \;
+  find $DIR -type f -exec install -m 0644 '{}' $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}/${DIR}/ \;
 done
-install -m 0644 diveintopython.html $RPM_BUILD_ROOT%{_docdir}/diveintopython/diveintopython.html
-install -m 0644 diveintopython.pdf $RPM_BUILD_ROOT%{_docdir}/diveintopython/diveintopython.pdf
 popd
 
-# Install single html page
-pushd dist/htmlflat/
-mkdir -p $RPM_BUILD_ROOT%{_docdir}/diveintopython-single-html
-find . -type d -exec mkdir -p $RPM_BUILD_ROOT%{_docdir}/diveintopython-single-html/'{}'  \;
-for DIR in * ; do
-  find $DIR -type f -exec install -m 0644 '{}' $RPM_BUILD_ROOT%{_docdir}/diveintopython-single-html/${DIR}/ \;
-done
-install -m 0644 diveintopython.html $RPM_BUILD_ROOT%{_docdir}/diveintopython-single-html/diveintopython.html
-install -m 0644 diveintopython.css $RPM_BUILD_ROOT%{_docdir}/diveintopython-single-html/diveintopython.css
-popd
+#install desktop file
+mkdir ${RPM_BUILD_ROOT}%{_datadir}/applications/
+cat %{SOURCE2}|sed "s|@DOCDIR@|%{_docdir}/%{name}-%{version}/|g" > ${RPM_BUILD_ROOT}%{_datadir}/applications/diveintopython.desktop
 
-# Install text version
-pushd dist/txt/
-mkdir -p $RPM_BUILD_ROOT%{_docdir}/diveintopython-txt
-install -m 0644 diveintopython.html $RPM_BUILD_ROOT%{_docdir}/diveintopython-txt/diveintopython.html
-install -m 0644 diveintopython.txt $RPM_BUILD_ROOT%{_docdir}/diveintopython-txt/diveintopython.txt
-popd
-
-# pdf desktop file
 desktop-file-install --vendor="fedora"                  \
+        --delete-original \
         --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
         --add-category="Documentation"                  \
-        %{SOURCE3}
-
+        ${RPM_BUILD_ROOT}%{_datadir}/applications/diveintopython.desktop
 
 %clean
 rm -rf $RPM_BUILD_ROOT
 
+%files 
+%defattr(-,root,root,-)
 
 %files html
 %defattr(-,root,root,-)
-%doc %{_docdir}/diveintopython-html/
+%doc %{_docdir}/%{name}-%{version}/html
 
-%files
+%files pdf
 %defattr(-,root,root,-)
-%doc %{_docdir}/diveintopython/
+%doc %{_docdir}/%{name}-%{version}/pdf
 %{_datadir}/applications/fedora-diveintopython.desktop
-%{_datadir}/pixmaps/diveintopython.png
 
 %files single-html
 %defattr(-,root,root,-)
-%doc %{_docdir}/diveintopython-single-html/
+%doc %{_docdir}/%{name}-%{version}/htmlflat
 
 %files txt
 %defattr(-,root,root,-)
-%doc %{_docdir}/diveintopython-txt/
+%doc %{_docdir}/%{name}-%{version}/txt
 
 
 %changelog
+* Wed Jan 23 2008 Mohd Izhar Firdaus Ismail <mohd.izhar.firdaus at gmail.com> - 5.4-10
+- Major cleanup of spec to be less complex
+- Made the packaging less diverted from the generated tree from upstream build script
+- Changed desktop file to use pdf mimetype icon as diveintopython.png is corrupted
+  even in upstream zip file
+- Removed unnecessary patches
+- Removed builreq ant as upstream make.sh uses upstream provided jars (we might want to
+  use ant from fedora repo, todo: investigate possibility of patching make.sh and adding
+  more java buildreqs for this)
+- Switched diveintopython to be a metapackage which pulls diveintopython-pdf
+
 * Sat Jan 19 2008 Marc Wiriadisastra <marc at mwiriadi.id.au> - 5.4-8
 - Removed multiple desktop-files
 - Made the default version the pdf version


--- diveintopython-index.xml.patch DELETED ---


--- diveintopython.desktop DELETED ---


--- diveintopython.xml.patch DELETED ---


--- make.sh.patch DELETED ---




More information about the fedora-extras-commits mailing list