Blob Blame History Raw
%global svnversion 35

Name:           indistarter
Version:        0.5.0
Release:        1.%{svnversion}svn%{?dist}
Summary:        GUI to start, stop and control an INDI server

License:        GPLv3+
URL:            http://indistarter.sourceforge.net/
# The source code is not available upstream as a package so we pulled it 
# from upstream's vcs. Use the following commands to generate the tarball:
# svn export -r 35 svn://svn.code.sf.net/p/indistarter/code/trunk indistarter-0.5.0
# tar -cJvf indistarter-0.5.0-35.tar.xz indistarter-0.5.0
Source0:        %{name}-%{version}-%{svnversion}.tar.xz

# This patch avoid stripping debuginfo from binary
# Since this is Fedora specific we don't ask upstream to include
Patch0:         indistarter_fix_debuginfo.patch

ExclusiveArch:  %{fpc_arches}

BuildRequires:  desktop-file-utils
BuildRequires:  fpc
BuildRequires:  lazarus
BuildRequires:  libappstream-glib

%description
Indistarter is a user interface to run a INDI server.
You can configure different profile for your astronomical equipment.
The INDI server can be launched locally or remotely on another computer.
In this last case a ssh tunnel is established to allow local client connection.

%prep
%autosetup -p1

#Remove spurious executable bit
chmod -x ./component/synapse/source/lib/*.pas

%build
# Configure script requires non standard parameters
./configure lazarus=%{_libdir}/lazarus prefix=%{_prefix}

# Doesn't like parallel building so we can't use make macro
make fpcopts="-O1 -g -gl -OoREGVAR -Ch2000000 -CX -XX"


%install
make install PREFIX=%{buildroot}%{_prefix}

# Menu entry
desktop-file-validate %{buildroot}%{_datadir}/applications/*.desktop

# Appdata file check
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/*.appdata.xml

%post
/bin/touch --no-create %{_datadir}/icons/hicolor &>/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

%posttrans
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :

%files
%license gpl-3.0.txt LICENSE
%doc %{_docdir}/%{name}
%{_bindir}/%{name}
%{_datadir}/applications/%{name}.desktop
%{_datadir}/appdata/%{name}.appdata.xml
%{_datadir}/icons/*/*/*/%{name}.png
%{_datadir}/pixmaps/%{name}.png


%changelog
* Sun May 22 2016 Mattia Verga <mattia.verga@tiscali.it> 0.5.0-1.35svn
- Upgrade to 0.5.0

* Fri Apr 22 2016 Mattia Verga <mattia.verga@tiscali.it> 0.4.0-1.28svn
- Upgrade to 0.4.0
- Use new fpc_arches macro as ExclusiveArch

* Thu Feb 04 2016 Fedora Release Engineering <releng@fedoraproject.org> - 0.3.0-4.20151215svn
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild

* Fri Jan 01 2016 Mattia Verga <mattia.verga@tiscali.it> 0.3.0-3.20151215svn
- Set fpc options from make command instead of patching sources

* Sun Dec 20 2015 Peter Robinson <pbrobinson@fedoraproject.org> 0.3.0-2.20151215svn
- Set ExcludeArch properly

* Tue Dec 15 2015 Mattia Verga <mattia.verga@tiscali.it> - 0.3.0-1.20151215svn
- Update to 0.3.0

* Sat Dec 12 2015 Mattia Verga <mattia.verga@tiscali.it> - 0.2.0-5.20151211svn
- Set ExcludeArch where fpc and lazarus are not available

* Fri Dec 11 2015 Mattia Verga <mattia.verga@tiscali.it> - 0.2.0-4.20151211svn
- Update svn version to fix missing license and appdata

* Wed Dec 09 2015 Mattia Verga <mattia.verga@tiscali.it> - 0.2.0-3.20151203svn
- Added missing license text

* Fri Dec 04 2015 Mattia Verga <mattia.verga@tiscali.it> - 0.2.0-2.20151203svn
- Removed libindi dependency

* Thu Dec 03 2015 Mattia Verga <mattia.verga@tiscali.it> - 0.2.0-1.20151203svn
- Update to 0.2.0 svn
- Added desktop-file-utils to buildrequires
- Removed unneeded ldconfig calls
- Add patch to avoid debuginfo stripping
- Add patch to fix appdata validation

* Fri Jul 31 2015 Mattia Verga <mattia.verga@tiscali.it> - 0.1.0-2.20150623svn
- Fix version/release
- Fix BuildRequires error and files ownership

* Tue Jun 23 2015 Mattia Verga <mattia.verga@tiscali.it> - 0.1.0-1.20150623svn
- Initial release