[skychart] Modify .spec for 3.6 version

mattia mattia at fedoraproject.org
Sat Mar 17 17:55:16 UTC 2012


commit 53a73b4eea17eac820ef6dddc06d297dcf315037
Author: Mattia Verga <mattia.verga at tiscali.it>
Date:   Sat Mar 17 18:54:33 2012 +0100

    Modify .spec for 3.6 version

 .gitignore    |    2 -
 skychart.spec |  109 +++++++++++++++++++++++++++++---------------------------
 2 files changed, 56 insertions(+), 55 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index bd24094..6dc1379 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,6 +1,4 @@
 skychart-3.0.1.6.tar.gz
 /skychart_3.2-source.tgz
-/data_jpleph.tgz
 /skychart-3.4-source.tgz
-/documentation.tar.gz
 /skychart-3.6-2150-src-nopatents.tar.bz2
diff --git a/skychart.spec b/skychart.spec
index b4b9b8b..6c9b24c 100644
--- a/skychart.spec
+++ b/skychart.spec
@@ -1,31 +1,36 @@
+%global svnversion 2150
+
 Name: skychart
-Version: 3.4
-Release: 4%{?dist}
+Version: 3.6
+Release: 1%{?dist}
 Summary: Planetarium software for the advanced amateur astronomer
 
 Group: Amusements/Graphics
 License: GPLv2+
 URL: http://www.ap-i.net/skychart/
-Source0: http://download.origo.ethz.ch/skychart/3239/skychart-%{version}-source.tgz
-Source1: http://download.origo.ethz.ch/skychart/2443/data_jpleph.tgz
-Source2: gpl.txt
-Source3: getdoc.sh
-# Source built using the following commands : ./getdoc.sh
-Source4: documentation.tar.gz
-
-Patch1: skychart-desktop.patch
-Patch2: skychart-strip.patch
-Patch3: skychart-wgetdata.patch
-Patch4: gcc47.patch
-
-# FIXME: http://koji.fedoraproject.org/koji/taskinfo?taskID=918916
-# no lazarus on s390(x) and lazarus < 0.9.30 on ppc(64)
-ExcludeArch:    ppc ppc64 s390 s390x
-
-BuildRequires:  lazarus >= 0.9.30
+%{name}-%{version}-%{svnversion}-src-nopatents.tar.bz2
+# Skychart contains iridflare.exe
+# Since it is pre-built code and the license is not clear
+# we remove it from sources.
+# Download upstream tarball and invoke this script
+# while in tarballs directory:
+# ./generate-tarball.sh 3.6-2150
+Source1: generate-tarball.sh
+Patch1: skychart-3.6-strip.patch
+Patch2: skychart-wgetdata.patch
+
+# no fpc and lazarus on s390(x)
+# no lazarus on sparc(64)
+ExcludeArch:    s390 s390x sparc sparc64
+
+# https://bugzilla.redhat.com/show_bug.cgi?id=789723
+ExcludeArch:    ppc ppc64
+
+BuildRequires: fpc >= 2.4.4
+BuildRequires: lazarus >= 0.9.30.4
 BuildRequires: ImageMagick desktop-file-utils dos2unix gtk2-devel
 BuildRequires: prelink
-Requires: xdg-utils tzdata
+Requires: xdg-utils tzdata xplanet
 
 %description
 This program enables you to draw sky charts, making use of the data in 16
@@ -52,30 +57,12 @@ within the program as an offline copy.
 
 
 %prep
-%setup -q -n %{name}-%{version}-source
-
-# Fix old FSF address in license file
-# See upstream bug at http://www.ap-i.net/mantis/view.php?id=910
-cp -p %SOURCE2 skychart/
+%setup -q -n %{name}-%{version}-%{svnversion}-src
 
-# Fix .desktop file
-# See upstream bug at http://www.ap-i.net/mantis/view.php?id=911
 %patch1 -p1
 
-%patch2 -p1
-
 # Disable wget for documentation and ephemeris data
-%patch3 -p1
-
-# Fix compilation with gcc 4.7
-# See upstream bug at http://www.ap-i.net/mantis/view.php?id=935
-%patch4 -p1
-
-# Use ephemeris data provided as source
-cp -p %SOURCE1 BaseData
-
-# Extract documentation provided as source
-%setup -q -T -D -a 4 -n %{name}-%{version}-source
+%patch2 -p1
 
 find skychart -type f -print0 |xargs -0 chmod 644
 
@@ -84,9 +71,8 @@ dos2unix -q -k tools/doc/html_doc/en/feature_class_fichiers/common.css
 dos2unix -q -k tools/doc/html_doc/en/feature_class_fichiers/custom.css
 dos2unix -q -k tools/doc/releasenotes*.txt
 
-# Remove binary files quicksat.exe and IRIDFLAR.EXE
+# Remove pre-compiled software quicksat.exe
 rm -R --force tools/data/quicksat
-rm -R --force tools/data/iridflar
 
 %build
 ./configure lazarus=%{_libdir}/lazarus prefix=%{_prefix}
@@ -94,24 +80,22 @@ rm -R --force tools/data/iridflar
 # We build these separately so that we can apply optflags
 make %{_smp_mflags} arch_flags="%{optflags}" -C skychart/library/getdss
 make %{_smp_mflags} arch_flags="%{optflags}" -C skychart/library/plan404
+make %{_smp_mflags} arch_flags="%{optflags}" -C skychart/library/wcs
 
 make # not concurrency-safe
 
-# Remove executable-stack to fix rpmlint warnings due to old Freepascal compiler
-# See upstream bug at http://www.ap-i.net/mantis/view.php?id=926
-# See Fedora bug at https://bugzilla.redhat.com/show_bug.cgi?id=771057
-execstack -c varobs/varobs
-execstack -c varobs/varobs_lpv_bulletin
-execstack -c skychart/cdc
-execstack -c skychart/cdcicon
-
-
 %install
 rm -rf %{buildroot}
 
+# Install main program
 make install PREFIX=%{buildroot}%{_prefix}
+
+# Install catalogs, translations and data files
 make install install_data PREFIX=%{buildroot}%{_prefix}
 
+# Install wiki documentation
+make install install_doc PREFIX=%{buildroot}%{_prefix}
+
 # Fix multilib path
 [ %{_lib} = lib ] || mv %{buildroot}%{_prefix}/{lib,%{_lib}}
 
@@ -129,6 +113,7 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/skychart.desktop
 %{_libdir}/*.so
 %{_datadir}/applications/*
 %{_datadir}/pixmaps/*
+%{_datadir}/icons/*
 %dir %{_datadir}/skychart
 %{_datadir}/skychart/data
 %{_datadir}/skychart/cat
@@ -142,12 +127,30 @@ desktop-file-validate %{buildroot}%{_datadir}/applications/skychart.desktop
 %defattr(-,root,root,-)
 %doc %{_datadir}/skychart/doc/wiki_doc
 
-%post -p /sbin/ldconfig
+%post
+/sbin/ldconfig
+/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
+
+%postun
+/sbin/ldconfig
+if [ $1 -eq 0 ] ; then
+    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
+    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
+fi
 
-%postun -p /sbin/ldconfig
+%posttrans
+/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
 
 
 %changelog
+* Sat Mar 17 2012 Mattia Verga <mattia.verga at tiscali.it> - 3.6-1
+- Update to 3.6 version
+- Modify sources to remove iridflar.exe
+- Remove patches merged upstream
+- Make sure fpc >= 2.4.4 to avoid execstack errors
+- Add scriptlets for icon cache
+- Make sure lazarus >= 0.9.30.4 to work with F17 and higher
+
 * Sun Jan 22 2012 Mattia Verga <mattia.verga at tiscali.it> - 3.4-4
 - Added wiki documentation as subpackage
 - Fix old FSF address in license file


More information about the scm-commits mailing list