Blob Blame History Raw
# Because upstream is not good about bumping the library version for ABI
# incompatible changes the Release should not be reset to 1 unless both version
# numbers change, otherwise the NEVR of the library may cause a package not to
# be updated even if it should be.
%global srcname tqsl
%global tqslver 2.0.3
%global libtqslver 2.4
# The tsql library needs to maintain it's own release version otherwise it 
# would not be "newer" than the installed version when the application release
# resets to 1.
%global libtqslrel 7%{?dist}

%{?rhel: %global cmake %{cmake28}}

Name:           trustedqsl
Version:        %{tqslver}
Release:        6%{?dist}
Summary:        TrustedQSL ham-radio applications
License:        BSD
URL:            http://sourceforge.net/projects/trustedqsl/

Source0:        http://downloads.sourceforge.net/%{name}/%{srcname}-%{version}.tar.gz

Patch0:         tqsl-2.0-rpath.patch
Patch1:         tqsl-tqsllib.patch
Patch2:         tqsl-2.0.1-gcc44_pragma.patch

%if 0%{?rhel}
BuildRequires:  cmake28
BuildRequires:  db4-devel
%else
BuildRequires:  cmake
BuildRequires:  libdb-devel
%endif
BuildRequires:  openssl-devel
BuildRequires:  curl-devel
BuildRequires:  expat-devel
BuildRequires:  wxGTK-devel
BuildRequires:  zlib-devel
BuildRequires:  desktop-file-utils

Requires:       curl

%description
The TrustedQSL applications are used for generating digitally signed
QSO records (records of Amateur Radio contacts). This package
contains the GUI applications tqslcert and tqsl.

%package -n tqsllib
Version:        %libtqslver
Release:        %{libtqslrel}
Summary:        TrustedQSL library

%description -n tqsllib
The TrustedQSL library is used for generating digitally signed
QSO records (records of Amateur Radio contacts). This package
contains the library and configuration files needed to run
TrustedQSL applications.

%package -n tqsllib-devel
Version:        %libtqslver
Release:        %{libtqslrel}
Summary:        Development files the for TrustedQSL library
Requires:       tqsllib%{?_isa} = %{version}-%{libtqslrel}

%description -n tqsllib-devel
The TrustedQSL library is used for generating digitally signed
QSO records (records of Amateur Radio contacts). This package
contains the to develop with tqsllib.


%prep
%setup -q -n %{srcname}-%{tqslver}
%patch0 -p1 -b .rpath
%patch1 -p1 -b .soname
%if 0%{?rhel}
%patch2 -p1 -b .pragma
%endif


%build
rm -rf build && mkdir build && pushd build
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
       ../

make %{?_smp_mflags}


%install
pushd build
%make_install
popd

# Install desktop files
mkdir -p %{buildroot}%{_datadir}/applications
sed -i -e "s/.png//g" -e "s/Application;/Network;/g" -e "s/Utility;/GTK;/g" apps/tqsl.desktop
desktop-file-install \
        --dir=%{buildroot}%{_datadir}/applications apps/tqsl.desktop

# Install icons
for size in 16 32 48 64 128; do
    install -Dpm 0644 apps/icons/key${size}.png \
    %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/TrustedQSL.png
done


%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

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


%files
%doc AUTHORS.txt LICENSE.txt README
%{_bindir}/tqsl
%{_datadir}/applications/tqsl.desktop
%{_datadir}/icons/hicolor/*/apps/TrustedQSL.png
%{_datadir}/pixmaps/TrustedQSL.png
%{_datadir}/TrustedQSL
%{_mandir}/man5/*.5*

%files -n tqsllib
%doc src/LICENSE src/ChangeLog.txt
%{_libdir}/libtqsllib.so.%{libtqslver}

%files -n tqsllib-devel
%{_includedir}/*
%{_libdir}/libtqsllib.so


%changelog
* Mon Sep  8 2014 Richard Shaw <hobbes1069@gmail.com> - 2.0.3-6
- Update to latest upstream release.
- Add dist tag to libtqsl release and clean up the mess I made.

* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild

* Mon Jul  7 2014 Richard Shaw <hobbes1069@gmail.com> - 2.0.2-1
- Update to latest upstream release.

* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild

* Thu Dec 19 2013 Richard Shaw <hobbes1069@gmail.com> - 2.0.1-1
- Update to version 2.0.1.
- Add conditionals for EPEL-6.

* Wed Sep 25 2013 Richard Shaw <hobbes1069@gmail.com> - 1.14.3-1
- Update to latest upstream release.
- This package now provides tqsllib.

* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild

* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild

* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild

* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-3
- Rebuilt for c++ ABI breakage

* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild

* Sun Nov 20 2011 cooly@gnome.eu.org - 1.13-1
- drop icon and gcc patch - fixed upstream
- new upstream release

* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-8
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild

* Wed Jul 14 2010 Dan HorĂ¡k <dan@danny.cz> - 1.11-7
- rebuilt against wxGTK-2.8.11-2

* Sun Oct 25 2009 Lucian Langa <cooly@gnome.eu.org> - 1.11-6
- fix desktop file (#530839)

* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild

* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild

* Mon Dec 01 2008 Lucian Langa <cooly@gnome.eu.org> - 1.11-3
- fix unowned directories

* Fri Oct 10 2008 Lucian Langa <cooly@gnome.eu.org> - 1.11-2
- misc cleanups
- update buildrequires
- package missing docs

* Sun Jul 13 2008 Lucian Langa <lucilanga@gnome.org> - 1.11-1
- initial spec file for fedora