- Removed multiple desktop-files
- Made the default version the pdf version - Added build requires check so it can build on F7 - Fixed spec file so html works now
This commit is contained in:
parent
06074665d3
commit
4b770e6d9e
5 changed files with 51 additions and 96 deletions
|
|
@ -1,9 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Dive Into Python
|
||||
Comment=Open Dive Into Python book
|
||||
Exec=xdg-open /usr/share/diveintopython-pdf/diveintopython.pdf
|
||||
Icon=diveintopython
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Application;Development;
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Dive Into Python
|
||||
Comment=Open Dive Into Python book
|
||||
Exec=xdg-open /usr/share/diveintopython-single-html/diveintopython.html
|
||||
Icon=diveintopython
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Application;Development;
|
||||
|
|
@ -1,9 +0,0 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Dive Into Python
|
||||
Comment=Open Dive Into Python book
|
||||
Exec=xdg-open /usr/share/diveintopython-txt/diveintopython.txt
|
||||
Icon=diveintopython
|
||||
Terminal=false
|
||||
Type=Application
|
||||
Categories=Application;Development;
|
||||
|
|
@ -1,8 +1,8 @@
|
|||
[Desktop Entry]
|
||||
Encoding=UTF-8
|
||||
Name=Dive Into Python
|
||||
Name=Dive Into Python - pdf
|
||||
Comment=Open Dive Into Python book
|
||||
Exec=xdg-open /usr/share/diveintopython-html/index.html
|
||||
Exec=xdg-open /usr/share/doc/diveintopython/diveintopython.pdf
|
||||
Icon=diveintopython
|
||||
Terminal=false
|
||||
Type=Application
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
Name: diveintopython
|
||||
Version: 5.4
|
||||
Release: 6%{?dist}
|
||||
Release: 8%{?dist}
|
||||
|
||||
Summary: Dive into Python - a python book
|
||||
|
||||
|
|
@ -8,12 +8,9 @@ Group: Documentation
|
|||
License: GFDL
|
||||
URL: http://www.diveintopython.org
|
||||
Source0: http://www.diveintopython.org/download/%{name}-xml-%{version}.zip
|
||||
Source1: %{name}-html.desktop
|
||||
Source2: %{name}.png
|
||||
Source3: http://www.diveintopython.org/download/%{name}-common-%{version}.zip
|
||||
Source4: %{name}-pdf.desktop
|
||||
Source5: %{name}-txt.desktop
|
||||
Source6: %{name}-single-html.desktop
|
||||
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
|
||||
|
|
@ -21,7 +18,12 @@ Patch3: diveintopython-index.xml.patch
|
|||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||
BuildArch: noarch
|
||||
|
||||
BuildRequires: desktop-file-utils, ant, htmldoc, java-1.7.0-icedtea-devel, python, w3m
|
||||
BuildRequires: desktop-file-utils, ant, htmldoc, python, w3m
|
||||
%if 0%{?fedora} >= 8
|
||||
BuildRequires: java-1.7.0-icedtea-devel
|
||||
%else
|
||||
BuildRequires: java-1.5.0-gcj-devel
|
||||
%endif
|
||||
|
||||
%description
|
||||
Dive Into Python is a Python book for experienced programmers.
|
||||
|
|
@ -33,13 +35,6 @@ Group: Documentation
|
|||
Dive Into Python is a Python book for experienced programmers.
|
||||
The html version
|
||||
|
||||
%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 single-html
|
||||
Summary: Dive into Python - a python book
|
||||
Group: Documentation
|
||||
|
|
@ -55,7 +50,7 @@ Dive Into Python is a Python book for experienced programmers.
|
|||
The text version
|
||||
|
||||
%prep
|
||||
%setup -q -a 3 html
|
||||
%setup -q -a 2 html
|
||||
mv %{name}-%{version}/common xml/
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
|
@ -69,71 +64,53 @@ rm -f make.bat
|
|||
%install
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
install -m 0644 -D %{SOURCE2} $RPM_BUILD_ROOT%{_datadir}/pixmaps/diveintopython.png
|
||||
install -m 0644 -D %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/diveintopython.png
|
||||
# Install html version
|
||||
install -m 0755 -d $RPM_BUILD_ROOT%{_datadir}/diveintopython-html
|
||||
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
|
||||
install -m 0755 -d $RPM_BUILD_ROOT%{_datadir}/diveintopython-html/${DIR}
|
||||
find $DIR -type f -exec install -m 0644 '{}' $RPM_BUILD_ROOT%{_datadir}/diveintopython-html/${DIR}/ \;
|
||||
find $DIR -type f -exec install -m 0644 '{}' $RPM_BUILD_ROOT%{_docdir}/diveintopython-html/${DIR}/ \;
|
||||
done
|
||||
install -m 0644 diveintopython.css $RPM_BUILD_ROOT%{_datadir}/diveintopython-html/diveintopython.css
|
||||
install -m 0644 history.xml $RPM_BUILD_ROOT%{_datadir}/diveintopython-html/history.xml
|
||||
install -m 0644 index.html $RPM_BUILD_ROOT%{_datadir}/diveintopython-html/index.html
|
||||
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/
|
||||
install -m 0755 -d $RPM_BUILD_ROOT%{_datadir}/diveintopython-pdf
|
||||
mkdir -p $RPM_BUILD_ROOT%{_docdir}/diveintopython
|
||||
find . -type d -exec mkdir -p $RPM_BUILD_ROOT%{_docdir}/diveintopython/'{}' \;
|
||||
for DIR in * ; do
|
||||
install -m 0755 -d $RPM_BUILD_ROOT%{_datadir}/diveintopython-pdf/${DIR}
|
||||
find $DIR -type f -exec install -m 0644 '{}' $RPM_BUILD_ROOT%{_datadir}/diveintopython-pdf/${DIR}/ \;
|
||||
find $DIR -type f -exec install -m 0644 '{}' $RPM_BUILD_ROOT%{_docdir}/diveintopython/${DIR}/ \;
|
||||
done
|
||||
install -m 0644 diveintopython.html $RPM_BUILD_ROOT%{_datadir}/diveintopython-pdf/diveintopython.html
|
||||
install -m 0644 diveintopython.pdf $RPM_BUILD_ROOT%{_datadir}/diveintopython-pdf/diveintopython.pdf
|
||||
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/
|
||||
install -m 0755 -d $RPM_BUILD_ROOT%{_datadir}/diveintopython-single-html
|
||||
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
|
||||
install -m 0755 -d $RPM_BUILD_ROOT%{_datadir}/diveintopython-single-html/${DIR}
|
||||
find $DIR -type f -exec install -m 0644 '{}' $RPM_BUILD_ROOT%{_datadir}/diveintopython-single-html/${DIR}/ \;
|
||||
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%{_datadir}/diveintopython-single-html/diveintopython.html
|
||||
install -m 0644 diveintopython.css $RPM_BUILD_ROOT%{_datadir}/diveintopython-single-html/diveintopython.css
|
||||
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 text version
|
||||
pushd dist/txt/
|
||||
install -m 0755 -d $RPM_BUILD_ROOT%{_datadir}/diveintopython-txt
|
||||
install -m 0644 diveintopython.html $RPM_BUILD_ROOT%{_datadir}/diveintopython-single-html/diveintopython.html
|
||||
install -m 0644 diveintopython.txt $RPM_BUILD_ROOT%{_datadir}/diveintopython-single-html/diveintopython.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
|
||||
|
||||
# HTML desktop file
|
||||
desktop-file-install --vendor="fedora" \
|
||||
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
|
||||
--add-category="Documentation" \
|
||||
%{SOURCE1}
|
||||
|
||||
# txt desktop file
|
||||
desktop-file-install --vendor="fedora" \
|
||||
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
|
||||
--add-category="Documentation" \
|
||||
%{SOURCE5}
|
||||
|
||||
# pdf desktop file
|
||||
desktop-file-install --vendor="fedora" \
|
||||
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
|
||||
--add-category="Documentation" \
|
||||
%{SOURCE4}
|
||||
|
||||
# single-html desktop file
|
||||
desktop-file-install --vendor="fedora" \
|
||||
--dir=${RPM_BUILD_ROOT}%{_datadir}/applications \
|
||||
--add-category="Documentation" \
|
||||
%{SOURCE6}
|
||||
%{SOURCE3}
|
||||
|
||||
|
||||
%clean
|
||||
|
|
@ -142,29 +119,34 @@ rm -rf $RPM_BUILD_ROOT
|
|||
|
||||
%files html
|
||||
%defattr(-,root,root,-)
|
||||
%doc %{_datadir}/diveintopython-html/
|
||||
%{_datadir}/applications/fedora-diveintopython-html.desktop
|
||||
%{_datadir}/pixmaps/diveintopython.png
|
||||
%doc %{_docdir}/diveintopython-html/
|
||||
|
||||
%files pdf
|
||||
%files
|
||||
%defattr(-,root,root,-)
|
||||
%doc %{_datadir}/diveintopython-pdf/
|
||||
%{_datadir}/applications/fedora-diveintopython-pdf.desktop
|
||||
%doc %{_docdir}/diveintopython/
|
||||
%{_datadir}/applications/fedora-diveintopython.desktop
|
||||
%{_datadir}/pixmaps/diveintopython.png
|
||||
|
||||
%files single-html
|
||||
%defattr(-,root,root,-)
|
||||
%doc %{_datadir}/diveintopython-single-html/
|
||||
%{_datadir}/applications/fedora-diveintopython-single-html.desktop
|
||||
%{_datadir}/pixmaps/diveintopython.png
|
||||
%doc %{_docdir}/diveintopython-single-html/
|
||||
|
||||
%files txt
|
||||
%defattr(-,root,root,-)
|
||||
%doc %{_datadir}/diveintopython-txt/
|
||||
%{_datadir}/diveintopython-txt/
|
||||
%{_datadir}/applications/fedora-diveintopython-txt.desktop
|
||||
%doc %{_docdir}/diveintopython-txt/
|
||||
|
||||
|
||||
%changelog
|
||||
* Sat Jan 19 2008 Marc Wiriadisastra <marc@mwiriadi.id.au> - 5.4-8
|
||||
- Removed multiple desktop-files
|
||||
- Made the default version the pdf version
|
||||
- Added build requires check so it can build on F7
|
||||
|
||||
* Sat Jan 19 2008 Marc Wiriadisastra <marc@mwiriadi.id.au> - 5.4-7
|
||||
- Fixed spec file to install the txt version in the txt folder (bug #429239)
|
||||
- Added diveintopython.png to desktop file in txt version
|
||||
- Fixed desktop files to relate to each individual package more. (bug #429239)
|
||||
|
||||
* Wed Jan 9 2008 Marc Wiriadisastra <marc@mwiriadi.id.au> - 5.4-6
|
||||
- Fix ownership of folders
|
||||
- Fix spec file for spaces and tabs again :(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue