Blob Blame History Raw
Name:           vfrnav
Version:        20140321
Release:        1%{?dist}
Summary:        VFR/IFR Navigation

Group:          Applications/Productivity
License:        GPLv2+
URL:            http://www.baycom.org/~tom/vfrnav
Source0:        http://download.gna.org/vfrnav/%{name}-%{version}.tar.gz
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)

Patch0:         vfrnav-webkit.patch
Patch1:         octave-3.8.patch

%bcond_without webservice

BuildRequires:  gtkmm30-devel
BuildRequires:  libxml++-devel >= 2.14.0
BuildRequires:  sqlite-devel >= 3.0
BuildRequires:  gpsd-devel
BuildRequires:  libsqlite3x-devel
BuildRequires:  gdal-devel
BuildRequires:  gypsy-devel
BuildRequires:  bluez-libs-devel
BuildRequires:  eigen3-devel
BuildRequires:  boost-devel
BuildRequires:  cairomm-devel
BuildRequires:  cairo-devel
BuildRequires:  zfstream-devel
BuildRequires:  gettext
%ifnarch s390 s390x
BuildRequires:  pilot-link-devel
%endif
BuildRequires:  gnome-bluetooth-libs-devel
BuildRequires:  desktop-file-utils
BuildRequires:  ImageMagick
BuildRequires:  geoclue-devel
BuildRequires:  gsl-devel
BuildRequires:  libftdi-devel
BuildRequires:  libftdi-c++-devel
BuildRequires:  libudev-devel
BuildRequires:  libXScrnSaver-devel
BuildRequires:  evince-devel
BuildRequires:  libusb1-devel
BuildRequires:  libcurl-devel
BuildRequires:  webkitgtk3-devel
BuildRequires:  openjpeg-devel
BuildRequires:  libsoup-devel
BuildRequires:  systemd-devel
BuildRequires:  transfig
BuildRequires:  texlive
BuildRequires:  texlive-texconfig
BuildRequires:  texlive-latex
BuildRequires:  texlive-latex-bin-bin
BuildRequires:  texlive-epstopdf
BuildRequires:  texlive-epstopdf-bin
BuildRequires:  texlive-umlaute
BuildRequires:  texlive-babel-german
BuildRequires:  texlive-multirow
BuildRequires:  texlive-oberdiek
BuildRequires:  texlive-tools
BuildRequires:  poppler-utils
BuildRequires:  readline-devel
BuildRequires:  geos-devel
BuildRequires:  polyclipping-devel
BuildRequires:  octave
BuildRequires:  octave-devel
BuildRequires:  inkscape
Requires:       gypsy
Requires:       libreoffice-core
Requires:       libreoffice-calc

%if %{with webservice}
BuildRequires:  jsoncpp-devel
BuildRequires:  sqlite
%endif

%description
This is a navigation application for VFR and IFR flying.

%package utils
Summary:        VFR Navigation Utilities
Group:          Applications/Productivity

Requires:       %{name} = %{version}

%description utils
This package contains utilities for database creation and manipulation
for the VFR navigation application.

%package wetterdl
Summary:        VFR Navigation Weather Downloader
Group:          Applications/Productivity
Requires:       %{name} = %{version}

%description wetterdl
This package contains a downloader application for weather
pictures from flugwetter.de and other sources.

%package validatorservice
Summary:        VFR Navigation CFMU Validator Service
Group:          Applications/Productivity
Requires:       %{name} = %{version}
Requires:       xorg-x11-server-Xvfb

%description validatorservice
Opening the connection to the CFMU validator takes some time (in the order
of seconds to minutes). In order to amortize this time over multiple tasks,
this package contains a local socket validator server.

%if %{with webservice}
%package webservice
Summary:        VFR Navigation CFMU Autorouter Webservice
Group:          Applications/Productivity
Requires:       %{name} = %{version}
Requires:       %{name}-validatorservice = %{version}
Requires:       httpd
Requires:       php
Requires:       php-pdo
Requires:       php-pecl-jsonc

%description webservice
This package contains a webservice for the CFMU Autorouter.
%endif

%prep
%setup -q
%patch0 -p0 -b .webkit
%patch1 -p1 -b .oct

%build
%configure
make %{?_smp_mflags}

%install
rm -rf $RPM_BUILD_ROOT
make install DESTDIR=$RPM_BUILD_ROOT

for i in $RPM_BUILD_ROOT/%{_datadir}/applications/*.desktop; do
  grep -v '^\(\(X-\)\|\(Version\)\|\(Encoding\)\)' $i > $i.tmp
  sed -e s,Exec=/usr/bin/,Exec=, < $i.tmp > $i
  rm -f $i.tmp
done

for i in $RPM_BUILD_ROOT/%{_datadir}/applications/*.desktop; do
  desktop-file-validate $i
done

# convert icons to sane dimensions
install -d $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/32x32/apps
install -d $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/48x48/apps
convert -size 32x32 $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/26x26/apps/vfrnav.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/32x32/apps/vfrnav.png
convert -size 48x48 $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/40x40/apps/vfrnav.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/48x48/apps/vfrnav.png
convert -size 32x32 $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/26x26/apps/wetterdl.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/32x32/apps/wetterdl.png
convert -size 48x48 $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/40x40/apps/wetterdl.png $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/48x48/apps/wetterdl.png
rm -rf $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/26x26/
rm -rf $RPM_BUILD_ROOT/%{_datadir}/icons/hicolor/40x40/

install -d $RPM_BUILD_ROOT/%{_sysconfdir}/vfrnav

rm -f $RPM_BUILD_ROOT/%{_sbindir}/cfmuws
rm -f $RPM_BUILD_ROOT/lib/systemd/system/cfmuws.service
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cfmuws
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/vfrnav/cfmuwsusers.json

rm -f $RPM_BUILD_ROOT/%{_bindir}/cfmusidstar

rm -f $RPM_BUILD_ROOT/%{_libdir}/libvfrnav.so
rm -f $RPM_BUILD_ROOT/%{_libdir}/libvfrnav.la
rm -f $RPM_BUILD_ROOT/%{_libdir}/libvfrnav.a

install -d $RPM_BUILD_ROOT/run/vfrnav/validator
install -d $RPM_BUILD_ROOT/var/lib/vfrnav

%if %{with webservice}
install -d $RPM_BUILD_ROOT/%{_libdir}/vfrnav
echo "CREATE TABLE IF NOT EXISTS credentials (username TEXT UNIQUE NOT NULL, passwdclear TEXT, passwdmd5 TEXT, salt INTEGER);" | sqlite3 $RPM_BUILD_ROOT/%{_sysconfdir}/vfrnav/autoroute.db
install -d $RPM_BUILD_ROOT/run/vfrnav/autoroute
%else
rm -f $RPM_BUILD_ROOT/lib/systemd/system/cfmuautoroute.service
rm -f $RPM_BUILD_ROOT/lib/systemd/system/cfmuautoroute.socket
rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/sysconfig/cfmuautoroute
%endif

%pre validatorservice
getent group vfrnav &>/dev/null || groupadd -r vfrnav
getent passwd vfrnav &>/dev/null || \
useradd -g vfrnav -d /var/lib/vfrnav -M -r -s /sbin/nologin \
    -c "Special user account to be used by vfrnav cfmuautoroute/cfmuvalidate services" vfrnav

%post
touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :

%postun
if [ $1 -eq 0 ] ; then
    touch --no-create %{_datadir}/icons/hicolor &>/dev/null
    gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
fi

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

%clean
rm -rf $RPM_BUILD_ROOT

%files
%defattr(-,root,root,-)
%doc AUTHORS ChangeLog COPYING INSTALL NEWS README TODO doc/flightdeck.pdf
%{_datadir}/applications/vfrnav.desktop
%{_datadir}/applications/flightdeck.desktop
%{_datadir}/applications/vfrairporteditor.desktop
%{_datadir}/applications/vfrairspaceeditor.desktop
%{_datadir}/applications/vfrnavaideditor.desktop
%{_datadir}/applications/vfrtrackeditor.desktop
%{_datadir}/applications/vfrwaypointeditor.desktop
%{_datadir}/applications/acftperf.desktop
%{_datadir}/icons/hicolor/32x32/apps/vfrnav.png
%{_datadir}/icons/hicolor/48x48/apps/vfrnav.png
%dir %{_datadir}/%{name}
%{_datadir}/%{name}/vfrnav.png
%{_datadir}/%{name}/bluetooth.png
%{_datadir}/%{name}/BlankMap-World_gray.svg
%{_datadir}/%{name}/dbeditor.ui
%{_datadir}/%{name}/navigate.ui
%{_datadir}/%{name}/routeedit.ui
%{_datadir}/%{name}/prefs.ui
%{_datadir}/%{name}/acftperformance.ui
%{_datadir}/%{name}/cfmuvalidate.ui
%{_libdir}/libreoffice/share/registry/vfrnav.xcd
%{_libdir}/libvfrnav.so.0
%{_libdir}/libvfrnav.so.0.0.0
%{_bindir}/vfrnav
%{_bindir}/vfrnavaideditor
%{_bindir}/vfrwaypointeditor
%{_bindir}/vfrairwayeditor
%{_bindir}/vfrairporteditor
%{_bindir}/vfrairspaceeditor
%{_bindir}/vfrtrackeditor
%{_bindir}/vfrnavdb2xml
%{_bindir}/vfrnavfplan
%{_bindir}/vfrnavxml2db
%{_bindir}/acftperf
%{_bindir}/flightdeck
%{_bindir}/cfmuvalidate
%{_bindir}/cfmuautoroute
%{_bindir}/checkfplan
%dir %{_libexecdir}/%{name}
%{_libexecdir}/%{name}/cfmuvalidateserver
%{_datadir}/%{name}/themes/gtk-3.0/flightdeck.css
%{_datadir}/%{name}/flightdeck.ui
%{_datadir}/%{name}/flightdeck/hbdhg.cfg
%{_datadir}/%{name}/flightdeck/hbpbx.cfg
%{_datadir}/%{name}/flightdeck/hbpho.cfg
%{_datadir}/%{name}/flightdeck/hbtda.cfg
%{_datadir}/%{name}/flightdeck/hbtdb.cfg
%{_datadir}/%{name}/flightdeck/hbtdc.cfg
%{_datadir}/%{name}/flightdeck/sim.cfg
%{_datadir}/%{name}/aircraft/hbdhg.xml
%{_datadir}/%{name}/aircraft/hbpbx.xml
%{_datadir}/%{name}/aircraft/hbpho.xml
%{_datadir}/%{name}/aircraft/hbtda.xml
%{_datadir}/%{name}/aircraft/hbtdb.xml
%{_datadir}/%{name}/aircraft/hbtdc.xml
%{_datadir}/%{name}/navlogtemplates/navlog.ods

%files utils
%defattr(-,root,root,-)
%{_bindir}/vfrdbdafif
%{_bindir}/vfrdbmapelementsdb
%{_bindir}/vfrdboptimizelabelplacement
%{_bindir}/vfrdbrebuildspatialindex
%{_bindir}/vfrdbsrtm30db
%{_bindir}/vfrdbsrtmwatermask
%{_bindir}/vfrdbsettopo30
%{_bindir}/vfrdbtopo30zerotiles
%{_bindir}/vfrdbupdategndelev
%{_bindir}/vfrdbcamelcase
%{_bindir}/vfrnavwmmconv
%{_bindir}/vfrnavwmmtest
%{_bindir}/vfrdbxplane
%{_bindir}/vfrdbcsv
%{_bindir}/vfrdbxplaneexport
%{_bindir}/flightdeckftdieeprog
%{_bindir}/vfrdbairwaydump
%{_bindir}/vfrdbeadimport
%{_bindir}/vfrdbaixmimport
%{_bindir}/vfrdbopenair
%{_bindir}/vfrdbfasimport
%{_bindir}/vfrradconvert

%files wetterdl
%defattr(-,root,root,-)
%{_bindir}/wetterdl.py
%{_datadir}/applications/wetterdl.desktop
%{_datadir}/icons/hicolor/32x32/apps/wetterdl.png
%{_datadir}/icons/hicolor/48x48/apps/wetterdl.png

%files validatorservice
%defattr(-,root,root,-)
/lib/systemd/system/cfmuvalidate.service
/lib/systemd/system/cfmuvalidate.socket
%config(noreplace) %{_sysconfdir}/sysconfig/cfmuvalidate
%dir %attr(0755,vfrnav,vfrnav) /run/vfrnav
%dir %attr(0750,vfrnav,vfrnav) /run/vfrnav/validator
%dir %attr(0750,vfrnav,vfrnav) /var/lib/vfrnav

%if %{with webservice}
%files webservice
%defattr(-,root,root,-)
/lib/systemd/system/cfmuautoroute.service
/lib/systemd/system/cfmuautoroute.socket
%config(noreplace) %{_sysconfdir}/sysconfig/cfmuautoroute
%dir %{_sysconfdir}/vfrnav
%config(noreplace) %attr(0660,vfrnav,apache) %{_sysconfdir}/vfrnav/autoroute.db
%dir %attr(0750,vfrnav,apache) /run/vfrnav/autoroute
%endif

%changelog
* Sat Mar 22 2014 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20140321-1
- update to 20140321

* Fri Dec 20 2013 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20131127-2
- rebuild for gnome bluetooth breakage

* Wed Nov 27 2013 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20131127-1
- update to 20131127

* Mon Sep 23 2013 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20130920-1
- update to 20130920

* Thu Aug 29 2013 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20130829-1
- update to 20130829
- rebuild for gdal

* Thu Aug  1 2013 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20130801-1
- update to 20130801

* Tue Jul 30 2013 Petr Machata <pmachata@redhat.com> - 20130723-2
- Rebuild for boost 1.54.0

* Tue Jul 23 2013 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20130723-1
- update to 20130723
- rebuild for polyclipping

* Thu Jun 27 2013 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20130627-1
- update to 20130627
- rebuild for polyclipping

* Thu May 16 2013 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20130510-1
- update to 20130510

* Mon Apr 29 2013 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20130429-1
- update to 20130429

* Sun Mar 10 2013 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20130303-1
- update and rebuild for geos

* Mon Mar  4 2013 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20130123-2
- rebuild for polyclipping

* Sat Jan 26 2013 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20130123-1
- rebuild for geos

* Tue Jan 15 2013 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20130113-1
- update to 20130113

* Thu Jan 10 2013 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20130110-1
- update to 20130110
- rebuild for polyclipping

* Sat Dec 29 2012 Dan Horák <dan[at]danny.cz> - 20121212-3
- update BR for s390(x)

* Thu Dec 27 2012 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20121212-2
- rebuild for polyclipping 4.10.0

* Sun Dec 16 2012 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20121212-1
- update to 20121212

* Sat Dec  1 2012 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20121111-1
- update to 20121111

* Fri Aug 31 2012 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20120831-1
- update to 20120831

* Thu Aug 23 2012 Dan Horák <dan[at]danny.cz> - 20120815-2
- add explicit BR: readline-devel so we don't depend on pilot-link-devel to bring it in

* Wed Aug 15 2012 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20120815-1
- update to 20120815; rebuild for dependencies

* Fri Aug 10 2012 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20120810-1
- update to 20120810

* Wed Aug  1 2012 Thomas Sailer <t.sailer@alumni.ethz.ch> - 20120801-1
- update to 20120801, now with CFMU/IFPS routing and validation tools

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

* Fri Jul  6 2012 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.9-2
- gtkmm3 size allocation fixes

* Thu Jul  5 2012 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.9-1
- update to 0.9

* Fri Jun 22 2012 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.8-1
- update to 0.8 (flightdeck application, gtkmm30)

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

* Sat Jan 14 2012 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.7-1
- update to 0.7

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

* Wed Nov 30 2011 Dan Horák <dan[at]danny.cz> - 0.6-3
- no pilot-link on s390(x)

* Wed Aug 24 2011 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.6-2
- rebuild for new gpsd

* Sun Feb 13 2011 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.6-1
- update to 0.6

* Sat Nov 20 2010 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.5-1
- update to 0.5

* Fri Jul  9 2010 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.4-2
- rebuilt

* Wed Jan 13 2010 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.4-1
- update to 0.4

* Sun Sep 20 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.3-10
- fix for BZ#523309

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

* Fri May 29 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.3-8
- convert icons to a standard size
- vfrnav-utils now requires vfrnav

* Thu May 28 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.3-7
- fix BRs

* Sun May 10 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.3-6
- also remove Encoding tags from desktop files

* Sun May 10 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.3-5
- remove X- tags from desktop file
- remove absolute paths from desktop file

* Thu Apr 30 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.3-4
- change second group too
- handle icon cache
- validate desktop files

* Thu Apr 30 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.3-3
- change group
- drop unneeded R/BR
- implement Igor Juriskovic's suggestions

* Thu Apr 30 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.3-2
- cleanups for review submission

* Wed Mar 25 2009 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.3-1
- move to gypsy, add airways

* Sat Feb  2 2008 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.1-2
- move utilities into their own subpackage

* Sat Aug 25 2007 Thomas Sailer <t.sailer@alumni.ethz.ch> - 0.1-1
- initial spec file