diff --git a/.gitignore b/.gitignore index e69de29..11fe0ee 100644 --- a/.gitignore +++ b/.gitignore @@ -0,0 +1,8 @@ +/VPA_Base_JPLeph.tgz +/VPA_Base_Overlay.tgz +/VPA_Base_Texture_Mars.tgz +/VPA_Base_Texture_Mars_Historical.tgz +/VPA_Base_Texture_Mercury.tgz +/VPA_Base_Texture_Mercury_Historical.tgz +/VPA_Base_Texture_Venus.tgz +/virtualplanet-1.0-src-99-nopatents.tar.xz diff --git a/generate-tarball.sh b/generate-tarball.sh new file mode 100744 index 0000000..33bd250 --- /dev/null +++ b/generate-tarball.sh @@ -0,0 +1,15 @@ +#!/bin/sh + +VERSION=$1 + +#tar -xJvf virtualplanet-$VERSION-src.tar.xz +svn export svn://svn.code.sf.net/p/virtualplanet/code/trunk virtualplanet-1.0-src + +#Remove Mac and Windows stuff +rm -rf virtualplanet-$VERSION-src/Installer/Mac +rm -rf virtualplanet-$VERSION-src/Installer/Windows + +tar -cJvf virtualplanet-$VERSION-src-nopatents.tar.xz virtualplanet-$VERSION-src + +#Remove temporary directory +rm -rf virtualplanet-$VERSION-src \ No newline at end of file diff --git a/sources b/sources index e69de29..695256b 100644 --- a/sources +++ b/sources @@ -0,0 +1,8 @@ +be7c8fc693de748934ba4925a3ce9a7d VPA_Base_JPLeph.tgz +fd79516c4832e20a5b53d4785e13ae13 VPA_Base_Overlay.tgz +e6edbb3a8afad4252dc80ca273f73198 VPA_Base_Texture_Mars.tgz +e4b69b1a32d60950fbcf383e2e2aae2c VPA_Base_Texture_Mars_Historical.tgz +3a65d4257bda3923bb2185d3dfe4959b VPA_Base_Texture_Mercury.tgz +ed3acb3e5a392f6c5f266b035239f6b2 VPA_Base_Texture_Mercury_Historical.tgz +8a9aa516905044a889053f435fe581bd VPA_Base_Texture_Venus.tgz +a1de986d5445744138a32ebce7715503 virtualplanet-1.0-src-99-nopatents.tar.xz diff --git a/virtualplanet-fix-debuginfo.patch b/virtualplanet-fix-debuginfo.patch new file mode 100644 index 0000000..388ddd3 --- /dev/null +++ b/virtualplanet-fix-debuginfo.patch @@ -0,0 +1,72 @@ +diff -U 3 -H -d -r -N -- a/component/Makefile.in b/component/Makefile.in +--- a/component/Makefile.in 2015-07-27 14:43:35.000000000 +0200 ++++ b/component/Makefile.in 2016-01-22 18:14:53.086016998 +0100 +@@ -21,7 +21,7 @@ + unittargetdir=lib/$(CPU_TARGET)-$(OS_TARGET)-$(LCL_PLATFORM) + unitdir=uniqueinstance/lib/$(CPU_TARGET)-$(OS_TARGET)/ synapse/source/lib/lib/$(CPU_TARGET)-$(OS_TARGET)-$(LCL_PLATFORM)/ downloaddialog/lib/$(CPU_TARGET)-$(OS_TARGET)-$(LCL_PLATFORM)/ enhedits/lib/$(CPU_TARGET)-$(OS_TARGET)-$(LCL_PLATFORM)/ glscene/Packages/lib/$(CPU_TARGET)-$(OS_TARGET) libsql/lib/$(CPU_TARGET)-$(OS_TARGET)-$(LCL_PLATFORM)/ $(LAZDIR)/lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ $(LAZDIR)/lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ $(LAZDIR)/packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./ + includedir=./ +-options=-dUseCThreads -dLCL -dLCL$(LCL_PLATFORM) -MObjFPC -Sgi -Xs -CX -XX ++options=-dUseCThreads -dLCL -dLCL$(LCL_PLATFORM) -MObjFPC -Sgi -CX -XX -g -gl + + [clean] + files=$(wildcard $(COMPILER_UNITTARGETDIR)/*$(OEXT)) \ +diff -U 3 -H -d -r -N -- a/component/enhedits/Makefile.in b/component/enhedits/Makefile.in +--- a/component/enhedits/Makefile.in 2015-07-27 14:43:35.000000000 +0200 ++++ b/component/enhedits/Makefile.in 2016-01-22 18:15:33.145576633 +0100 +@@ -12,7 +12,7 @@ + unittargetdir=lib/$(CPU_TARGET)-$(OS_TARGET)-$(LCL_PLATFORM) + unitdir=$(LAZDIR)/lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ $(LAZDIR)/lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ $(LAZDIR)/packager/units/$(CPU_TARGET)-$(OS_TARGET)/ $(LAZDIR)/components/lazutils/lib/$(CPU_TARGET)-$(OS_TARGET) $(LAZDIR)/ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) ./ + includedir=./ +-options=-dLCL -dLCL$(LCL_PLATFORM) -MObjFPC -Sgi -Xs -CX -XX ++options=-dLCL -dLCL$(LCL_PLATFORM) -MObjFPC -Sgi -CX -XX -g -gl + + [target] + units=enhedit.pas +diff -U 3 -H -d -r -N -- a/component/glscene/Packages/Makefile.in b/component/glscene/Packages/Makefile.in +--- a/component/glscene/Packages/Makefile.in 2015-07-27 14:43:35.000000000 +0200 ++++ b/component/glscene/Packages/Makefile.in 2016-01-22 18:15:59.114881792 +0100 +@@ -12,7 +12,7 @@ + unittargetdir=lib/$(CPU_TARGET)-$(OS_TARGET) + unitdir=../Source $(LAZDIR)/components/images/lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) $(LAZDIR)/lcl/units/$(CPU_TARGET)-$(OS_TARGET) $(LAZDIR)/lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) $(LAZDIR)/packager/units/$(CPU_TARGET)-$(OS_TARGET) $(LAZDIR)/components/lazutils/lib/$(CPU_TARGET)-$(OS_TARGET) $(LAZDIR)/ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) . + includedir=../Source +-options= -MDelphi -Saghi -O1 -vewni -l -dLCL -dLCL$(LCL_PLATFORM) -Xs -CX -XX ++options= -MDelphi -Saghi -O1 -vewni -l -dLCL -dLCL$(LCL_PLATFORM) -CX -XX -g -gl + + [target] + units=GLScene_RunTime.pas +diff -U 3 -H -d -r -N -- a/component/libsql/Makefile.in b/component/libsql/Makefile.in +--- a/component/libsql/Makefile.in 2015-07-27 14:43:35.000000000 +0200 ++++ b/component/libsql/Makefile.in 2016-01-22 18:16:25.451713948 +0100 +@@ -12,7 +12,7 @@ + unittargetdir=lib/$(CPU_TARGET)-$(OS_TARGET)-$(LCL_PLATFORM) + unitdir=jansql/ $(LAZDIR)/lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ $(LAZDIR)/lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ $(LAZDIR)/packager/units/$(CPU_TARGET)-$(OS_TARGET)/ ./ + includedir=./ +-options=-dLCL -dLCL$(LCL_PLATFORM) -MObjFPC -Sgi -Xs -CX -XX ++options=-dLCL -dLCL$(LCL_PLATFORM) -MObjFPC -Sgi -CX -XX -g -gl + + [target] + units=libsql.pas +diff -U 3 -H -d -r -N -- a/install.sh b/install.sh +--- a/install.sh 2015-12-18 11:58:20.000000000 +0100 ++++ b/install.sh 2016-01-22 18:17:43.843327524 +0100 +@@ -23,7 +23,7 @@ + install -m 755 -d $destdir/share/icons/hicolor/48x48 + install -m 755 -d $destdir/share/icons/hicolor/48x48/apps + +-install -v -m 755 -s vpa/vpa $destdir/bin/virtualplanet ++install -v -m 755 vpa/vpa $destdir/bin/virtualplanet + install -v -m 644 Installer/Linux/vpa/share/applications/virtualplanet.desktop $destdir/share/applications/virtualplanet.desktop + install -v -m 644 Installer/Linux/vpa/share/pixmaps/virtualplanet.png $destdir/share/pixmaps/virtualplanet.png + install -v -m 644 Installer/Linux/vpa/share/pixmaps/virtualplanet.png $destdir/share/icons/hicolor/48x48/apps/virtualplanet.png +diff -U 3 -H -d -r -N -- a/vpa/Makefile.in b/vpa/Makefile.in +--- a/vpa/Makefile.in 2015-07-27 14:43:35.000000000 +0200 ++++ b/vpa/Makefile.in 2016-01-22 18:18:11.152131619 +0100 +@@ -17,7 +17,7 @@ + [compiler] + unittargetdir=units/$(CPU_TARGET)-$(OS_TARGET)-$(LCL_PLATFORM) + includedir=./ ../component/glscene/Source/ +-options= $(opt_target) -dUseCThreads -dLCL -dLCL$(LCL_PLATFORM) -MObjFPC -Sgi -O1 -vewni -l -Xs -CX -XX ++options= $(opt_target) -dUseCThreads -dLCL -dLCL$(LCL_PLATFORM) -MObjFPC -Sgi -O1 -vewni -l -CX -XX -g -gl + unitdir=../component/glscene/Packages/lib/$(CPU_TARGET)-$(OS_TARGET)/ ../component/uniqueinstance/lib/$(CPU_TARGET)-$(OS_TARGET)/ ../component/libsql/lib/$(CPU_TARGET)-$(OS_TARGET)-$(LCL_PLATFORM)/ ../component/enhedits/lib/$(CPU_TARGET)-$(OS_TARGET)-$(LCL_PLATFORM)/ $(LAZDIR)/components/turbopower_ipro/units/$(CPU_TARGET)-$(OS_TARGET) $(LAZDIR)/components/turbopower_ipro/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) $(LAZDIR)/ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/ $(LAZDIR)/components/printers/lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ $(LAZDIR)/components/cairocanvas/lib/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ $(LAZDIR)/lcl/units/$(CPU_TARGET)-$(OS_TARGET)/ $(LAZDIR)/lcl/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM)/ $(LAZDIR)/packager/units/$(CPU_TARGET)-$(OS_TARGET)/ $(LAZDIR)/components/lazutils/lib/$(CPU_TARGET)-$(OS_TARGET) $(LAZDIR)/ideintf/units/$(CPU_TARGET)-$(OS_TARGET)/$(LCL_PLATFORM) ./ + + [clean] diff --git a/virtualplanet-wgetdata.patch b/virtualplanet-wgetdata.patch new file mode 100644 index 0000000..a1b193a --- /dev/null +++ b/virtualplanet-wgetdata.patch @@ -0,0 +1,39 @@ +diff -U 3 -H -d -r -N -- b/install_data.sh c/install_data.sh +--- b/install_data.sh 2015-12-04 08:57:53.399335129 +0100 ++++ c/install_data.sh 2015-12-04 20:59:02.939336490 +0100 +@@ -7,9 +7,6 @@ + pkg=$1.tgz + ddir=$2 + pkgz=BaseData/$pkg +- if [ ! -e $pkgz ]; then +- wget http://sourceforge.net/projects/virtualplanet/files/9-Source_Data/$pkg/download -O $pkgz +- fi + tar xvzf $pkgz -C $ddir + } + +diff -U 3 -H -d -r -N -- b/install_data2.sh c/install_data2.sh +--- b/install_data2.sh 2015-12-04 08:57:53.352329188 +0100 ++++ c/install_data2.sh 2015-12-05 10:26:58.614432433 +0100 +@@ -7,9 +7,6 @@ + pkg=$1.tgz + ddir=$2 + pkgz=BaseData/$pkg +- if [ ! -e $pkgz ]; then +- wget http://sourceforge.net/projects/virtualplanet/files/9-Source_Data/$pkg/download -O $pkgz +- fi + tar xvzf $pkgz -C $ddir + } + +diff -U 3 -H -d -r -N -- b/install_data3.sh c/install_data3.sh +--- b/install_data3.sh 2015-12-04 08:57:53.399335129 +0100 ++++ c/install_data3.sh 2015-12-04 09:02:26.018902207 +0100 +@@ -7,9 +7,6 @@ + pkg=$1.tgz + ddir=$2 + pkgz=BaseData/$pkg +- if [ ! -e $pkgz ]; then +- wget http://sourceforge.net/projects/virtualplanet/files/9-Source_Data/$pkg/download -O $pkgz +- fi + tar xvzf $pkgz -C $ddir + } + diff --git a/virtualplanet.spec b/virtualplanet.spec new file mode 100644 index 0000000..e980e05 --- /dev/null +++ b/virtualplanet.spec @@ -0,0 +1,192 @@ +%global svnver 20160119svn99 +%global revision 99 + +Name: virtualplanet +Version: 1.0 +Release: 7.%{svnver}%{?dist} +Summary: An atlas for planets surface formations +# Some component of glscene used by virtualplanet are licensed MPLv1.1 only +License: GPLv3+ and MPLv1.1 +URL: http://www.ap-i.net/avp/ +# Virtual Planetary Atlas source contains Mac and Windows stuff +# so we use a script to remove that before importing in Fedora. +# Use this script to download svn version and clean it up: +# ./generate-tarball.sh 1.0 99 +Source0: %{name}-%{version}-src-%{revision}-nopatents.tar.xz +Source1: generate-tarball.sh +Source2: http://sourceforge.net/projects/virtualplanet/files/9-Source_Data/VPA_Base_JPLeph.tgz +Source3: http://sourceforge.net/projects/virtualplanet/files/9-Source_Data/VPA_Base_Texture_Mars.tgz +Source4: http://sourceforge.net/projects/virtualplanet/files/9-Source_Data/VPA_Base_Texture_Mercury.tgz +Source5: http://sourceforge.net/projects/virtualplanet/files/9-Source_Data/VPA_Base_Texture_Venus.tgz +Source6: http://sourceforge.net/projects/virtualplanet/files/9-Source_Data/VPA_Base_Overlay.tgz +Source7: http://sourceforge.net/projects/virtualplanet/files/9-Source_Data/VPA_Base_Texture_Mars_Historical.tgz +Source8: http://sourceforge.net/projects/virtualplanet/files/9-Source_Data/VPA_Base_Texture_Mercury_Historical.tgz + + +# Virtualplanet doesn't support set FPC options from command line +# This patch changes options in Makefiles to avoid stripping +# executables and to enable debug info +# Fedora specific, not reported upstream +Patch1: virtualplanet-fix-debuginfo.patch + +# Virtualplanet use wget to download source data +# We disable that and use source files +# Fedora specific, not reported upstream +Patch2: virtualplanet-wgetdata.patch + +# fpc isn't available on aarch64, ppc and s390 +# so virtualplanet could not build +ExclusiveArch: %{ix86} %{arm} x86_64 + + +BuildRequires: desktop-file-utils +BuildRequires: dos2unix +BuildRequires: gtk2-devel +BuildRequires: fpc +BuildRequires: lazarus + +BuildRequires: pkgconfig +BuildRequires: pkgconfig(glu) + +Requires: %{name}-data-base = %{version}-%{release} +# Virtualplanet requires libpasastro to function properly +# but rpm doesn't find this autorequire +Requires: libpasastro%{?_isa} + + +%description +Virtual Planets Atlas displays surface information for planets +Mars, Venus and Mercury. + +It is based on the interface of well known Virtual Moon Atlas + +%package doc +Summary: Documentation files for Virtual Planets Atlas +License: GFDL +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description doc +Documentation files for Virtual Planets Atlas + +%package data-base +Summary: Base data for Virtual Planets Atlas +License: Public Domain +Requires: %{name} = %{version}-%{release} +BuildArch: noarch + +%description data-base +Base data for Virtual Planets Atlas. It includes base textures, +database and overlays + +%prep +%setup -q -n %{name}-%{version}-src-%{revision} + +%patch1 -p1 + +%patch2 -p1 + + + +%build +./configure lazarus=%{_libdir}/lazarus prefix=%{_prefix} + +# Virtualplanet doesn't like parallel building so we don't use macro. +# Some components support passing options to fpc compiler +# to generate debug info. +make fpcopts="-O1 -g -gl -OoREGVAR -Ch2000000 -CX -XX" + +# Put additional catalogs files where required for installation +cp -p %SOURCE2 ./BaseData +cp -p %SOURCE3 ./BaseData +cp -p %SOURCE4 ./BaseData +cp -p %SOURCE5 ./BaseData +cp -p %SOURCE6 ./BaseData +cp -p %SOURCE7 ./BaseData +cp -p %SOURCE8 ./BaseData + + +%install +# Install main program +make install PREFIX=%{buildroot}%{_prefix} + +# Install data files +make install install_data PREFIX=%{buildroot}%{_prefix} +make install install_data2 PREFIX=%{buildroot}%{_prefix} + +# For now we don't build extra textures +# because they're over 1GB of data +#make install install_data3 PREFIX=%%{buildroot}%%{_prefix} + + +%check +# Menu entry +desktop-file-validate %{buildroot}%{_datadir}/applications/virtualplanet.desktop + +%post +/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : +/usr/bin/update-desktop-database &> /dev/null || : + +%postun +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 +/usr/bin/update-desktop-database &> /dev/null || : + +%posttrans +/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : + + +%files +%license gpl-3.0.txt LICENSE +%doc %{_datadir}/doc/%{name} +%{_bindir}/%{name} +%{_datadir}/applications/%{name}.desktop +%{_datadir}/pixmaps/%{name}.png +%{_datadir}/icons/*/*/*/%{name}.png +%dir %{_datadir}/%{name} +%{_datadir}/%{name}/language/ +%dir %{_datadir}/%{name}/data +%{_datadir}/%{name}/data/country.tab +%{_datadir}/%{name}/data/retic.cur + +%files doc +%license doc/fdl-1.3.txt doc/LICENSE +%doc %{_datadir}/%{name}/doc/ + +%files data-base +%{_datadir}/%{name}/data/jpleph/ +%{_datadir}/%{name}/Database/ +%{_datadir}/%{name}/Overlay/ +%{_datadir}/%{name}/Textures/ + + +%changelog +* Sat Mar 12 2016 Mattia Verga - 1.0-7.20160119svn99 +- Fix directories ownership +- Add update-desktop-database scripts +- Use ExclusiveArch instead of ExcludeArch +- Correct license to reflect some components only MPLv1.1 + +* Fri Jan 22 2016 Mattia Verga - 1.0-6.20160119svn99 +- Update svn revision to fix ARM build +- Moved tests into %%check +- Added architecture to libpasastro dependency + +* Sun Dec 20 2015 Mattia Verga - 1.0-5.20151220svn +- Properly set ExcludeArch + +* Sun Dec 20 2015 Mattia Verga - 1.0-4.20151220svn +- Libraries are now in separate package libpasastro + +* Sat Dec 19 2015 Mattia Verga - 1.0-3.20151217svn +- Add mesa-libGLU-devel to buildrequire + +* Thu Dec 17 2015 Mattia Verga - 1.0-2.20151217svn +- Update svn version +- Add license to main package and to documentation +- Fix building library with optflags scriptlets + +* Fri Dec 04 2015 Mattia Verga - 1.0-1 +- Initial release