38e7889
# Because upstream is not good about bumping the library version for ABI
38e7889
# incompatible changes the Release should not be reset to 1 unless both version
38e7889
# numbers change, otherwise the NEVR of the library may cause a package not to
38e7889
# be updated even if it should be.
7cdc389
%global srcname tqsl
45afa16
%global tqslver 2.0.3
38e7889
%global libtqslver 2.4
45afa16
# The tsql library needs to maintain it's own release version otherwise it 
45afa16
# would not be "newer" than the installed version when the application release
45afa16
# resets to 1.
936b239
%global libtqslrel 7%{?dist}
38e7889
38e7889
%{?rhel: %global cmake %{cmake28}}
7cdc389
7cdc389
Name:           trustedqsl
7cdc389
Version:        %{tqslver}
936b239
Release:        6%{?dist}
7cdc389
Summary:        TrustedQSL ham-radio applications
7cdc389
License:        BSD
7cdc389
URL:            http://sourceforge.net/projects/trustedqsl/
7cdc389
7cdc389
Source0:        http://downloads.sourceforge.net/%{name}/%{srcname}-%{version}.tar.gz
7cdc389
38e7889
Patch0:         tqsl-2.0-rpath.patch
38e7889
Patch1:         tqsl-tqsllib.patch
38e7889
Patch2:         tqsl-2.0.1-gcc44_pragma.patch
7cdc389
38e7889
%if 0%{?rhel}
38e7889
BuildRequires:  cmake28
38e7889
BuildRequires:  db4-devel
38e7889
%else
be23730
BuildRequires:  cmake
7cdc389
BuildRequires:  libdb-devel
38e7889
%endif
38e7889
BuildRequires:  openssl-devel
3e1f2f3
BuildRequires:  curl-devel
3e1f2f3
BuildRequires:  expat-devel
7cdc389
BuildRequires:  wxGTK-devel
7cdc389
BuildRequires:  zlib-devel
7cdc389
BuildRequires:  desktop-file-utils
7cdc389
7cdc389
Requires:       curl
173d54e
173d54e
%description
173d54e
The TrustedQSL applications are used for generating digitally signed
173d54e
QSO records (records of Amateur Radio contacts). This package
173d54e
contains the GUI applications tqslcert and tqsl.
173d54e
7cdc389
%package -n tqsllib
7cdc389
Version:        %libtqslver
936b239
Release:        %{libtqslrel}
7cdc389
Summary:        TrustedQSL library
7cdc389
7cdc389
%description -n tqsllib
7cdc389
The TrustedQSL library is used for generating digitally signed
7cdc389
QSO records (records of Amateur Radio contacts). This package
7cdc389
contains the library and configuration files needed to run
7cdc389
TrustedQSL applications.
7cdc389
7cdc389
%package -n tqsllib-devel
7cdc389
Version:        %libtqslver
936b239
Release:        %{libtqslrel}
7cdc389
Summary:        Development files the for TrustedQSL library
45afa16
Requires:       tqsllib%{?_isa} = %{version}-%{libtqslrel}
7cdc389
7cdc389
%description -n tqsllib-devel
7cdc389
The TrustedQSL library is used for generating digitally signed
7cdc389
QSO records (records of Amateur Radio contacts). This package
7cdc389
contains the to develop with tqsllib.
7cdc389
7cdc389
173d54e
%prep
7cdc389
%setup -q -n %{srcname}-%{tqslver}
7cdc389
%patch0 -p1 -b .rpath
7cdc389
%patch1 -p1 -b .soname
38e7889
%if 0%{?rhel}
38e7889
%patch2 -p1 -b .pragma
38e7889
%endif
7cdc389
173d54e
173d54e
%build
7cdc389
rm -rf build && mkdir build && pushd build
7cdc389
%cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo \
7cdc389
       ../
7cdc389
173d54e
make %{?_smp_mflags}
173d54e
7cdc389
173d54e
%install
7cdc389
pushd build
7cdc389
%make_install
7cdc389
popd
7cdc389
7cdc389
# Install desktop files
173d54e
mkdir -p %{buildroot}%{_datadir}/applications
7cdc389
sed -i -e "s/.png//g" -e "s/Application;/Network;/g" -e "s/Utility;/GTK;/g" apps/tqsl.desktop
173d54e
desktop-file-install \
7cdc389
        --dir=%{buildroot}%{_datadir}/applications apps/tqsl.desktop
173d54e
7cdc389
# Install icons
7cdc389
for size in 16 32 48 64 128; do
7cdc389
    install -Dpm 0644 apps/icons/key${size}.png \
5d6026b
    %{buildroot}%{_datadir}/icons/hicolor/${size}x${size}/apps/TrustedQSL.png
7cdc389
done
173d54e
173d54e
7cdc389
%post
7cdc389
/sbin/ldconfig
38e7889
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
7cdc389
7cdc389
%postun
38e7889
/sbin/ldconfig
7cdc389
if [ $1 -eq 0 ] ; then
7cdc389
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
7cdc389
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
7cdc389
fi
173d54e
7cdc389
%posttrans
7cdc389
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
7cdc389
7cdc389
7cdc389
%files
7cdc389
%doc AUTHORS.txt LICENSE.txt README
173d54e
%{_bindir}/tqsl
38e7889
%{_datadir}/applications/tqsl.desktop
7cdc389
%{_datadir}/icons/hicolor/*/apps/TrustedQSL.png
38e7889
%{_datadir}/pixmaps/TrustedQSL.png
38e7889
%{_datadir}/TrustedQSL
7cdc389
%{_mandir}/man5/*.5*
7cdc389
7cdc389
%files -n tqsllib
38e7889
%doc src/LICENSE src/ChangeLog.txt
7cdc389
%{_libdir}/libtqsllib.so.%{libtqslver}
7cdc389
7cdc389
%files -n tqsllib-devel
7cdc389
%{_includedir}/*
7cdc389
%{_libdir}/libtqsllib.so
7cdc389
173d54e
173d54e
%changelog
936b239
* Mon Sep  8 2014 Richard Shaw <hobbes1069@gmail.com> - 2.0.3-6
45afa16
- Update to latest upstream release.
c7859a5
- Add dist tag to libtqsl release and clean up the mess I made.
45afa16
b66d589
* Mon Aug 18 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.2-2
b66d589
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
b66d589
5d6026b
* Mon Jul  7 2014 Richard Shaw <hobbes1069@gmail.com> - 2.0.2-1
5d6026b
- Update to latest upstream release.
5d6026b
a0f90dd
* Sun Jun 08 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.0.1-2
a0f90dd
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
a0f90dd
38e7889
* Thu Dec 19 2013 Richard Shaw <hobbes1069@gmail.com> - 2.0.1-1
38e7889
- Update to version 2.0.1.
38e7889
- Add conditionals for EPEL-6.
38e7889
7cdc389
* Wed Sep 25 2013 Richard Shaw <hobbes1069@gmail.com> - 1.14.3-1
7cdc389
- Update to latest upstream release.
7cdc389
- This package now provides tqsllib.
7cdc389
b24c50d
* Sun Aug 04 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-6
b24c50d
- Rebuilt for https://fedoraproject.org/wiki/Fedora_20_Mass_Rebuild
b24c50d
3b1e87f
* Fri Feb 15 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-5
3b1e87f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
3b1e87f
51fa24e
* Sun Jul 22 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-4
51fa24e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
51fa24e
3cb4597
* Tue Feb 28 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-3
3cb4597
- Rebuilt for c++ ABI breakage
3cb4597
6b59b45
* Sat Jan 14 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.13-2
6b59b45
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
6b59b45
044a270
* Sun Nov 20 2011 cooly@gnome.eu.org - 1.13-1
044a270
- drop icon and gcc patch - fixed upstream
044a270
- new upstream release
044a270
a277753
* Wed Feb 09 2011 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-8
a277753
- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild
a277753
5c7a781
* Wed Jul 14 2010 Dan HorĂ¡k <dan@danny.cz> - 1.11-7
5c7a781
- rebuilt against wxGTK-2.8.11-2
5c7a781
2f285f8
* Sun Oct 25 2009 Lucian Langa <cooly@gnome.eu.org> - 1.11-6
2f285f8
- fix desktop file (#530839)
2f285f8
267e60b
* Sun Jul 26 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-5
267e60b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
267e60b
5ee80be
* Wed Feb 25 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.11-4
5ee80be
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
5ee80be
c105489
* Mon Dec 01 2008 Lucian Langa <cooly@gnome.eu.org> - 1.11-3
c105489
- fix unowned directories
c105489
173d54e
* Fri Oct 10 2008 Lucian Langa <cooly@gnome.eu.org> - 1.11-2
173d54e
- misc cleanups
173d54e
- update buildrequires
173d54e
- package missing docs
173d54e
173d54e
* Sun Jul 13 2008 Lucian Langa <lucilanga@gnome.org> - 1.11-1
173d54e
- initial spec file for fedora
173d54e