engauge-digitizer/engauge-digitizer.spec

151 lines
5.4 KiB
RPMSpec
Raw Normal View History

2015-01-15 17:20:00 +00:00
%global checkout 28de7dcffa2585192e3118a4861e9232fbb5a09b
%global date 20150115
2013-11-13 20:58:45 +00:00
## Define the Qt3/Qt4 qmake
%global qmake %{_libdir}/qt-3.3/bin/qmake
%global qmake4 %{_libdir}/qt4/bin/qmake-qt4
Name: engauge-digitizer
Summary: Convert graphs or map files into numbers
Version: 5.2
2015-01-15 17:20:00 +00:00
Release: 6.%{date}git%(echo %{checkout} | cut -c-6)%{?dist}
2013-11-13 20:58:45 +00:00
Group: Applications/Engineering
License: GPLv2+
URL: http://digitizer.sourceforge.net/
2015-01-15 17:20:00 +00:00
Source0: http://sourceforge.net/code-snapshots/git/d/di/digitizer/code.git/digitizer-code-%{checkout}.zip
2013-11-13 20:58:45 +00:00
## Main building
BuildRequires: qt-devel >= 1:4.6.0, fftw-devel, desktop-file-utils
## BR for 'transpose' building
BuildRequires: qt3-devel, byacc, flex
2015-01-15 17:20:00 +00:00
BuildRequires: libappstream-glib
2013-11-13 20:58:45 +00:00
%description
This open source, digitizing software converts an image file
showing a graph or map, into numbers.
The image file can come from a scanner, digital camera
or screen-shot. The numbers can be read on the screen,
and written or copied to a spreadsheet.
The process starts with an image file containing a graph or map.
The final result is digitized data that can be used by other tools
such as Gnumeric.
%package transpose
Summary: The %{name} transpose utility
Group: Applications/Engineering
%description transpose
This utility often proves useful for post-processing the
output of Engauge Digitizer. Specifically, this utility can transpose the output
matrices found in the export files.
%prep
2015-01-15 17:20:00 +00:00
%setup -q -n digitizer-code-%{checkout}
2013-11-13 20:58:45 +00:00
## Fix 'src/pointset.cpp' compilation error.
sed -i '36a #include <algorithm>' src/digitdoc.cpp
sed -i '32a #include <algorithm>' src/pointset.cpp
%build
%qmake4 -makefile \
QMAKE_CFLAGS="$RPM_OPT_FLAGS -D_REENTRANT -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB" \
QMAKE_CXXFLAGS="$RPM_OPT_FLAGS -D_REENTRANT -DQT_QT3SUPPORT_LIB -DQT3_SUPPORT -DQT_GUI_LIB -DQT_NETWORK_LIB -DQT_CORE_LIB"
make %{?_smp_mflags}
pushd utility/transpose
%qmake -makefile \
QMAKE_CFLAGS="$RPM_OPT_FLAGS -D_REENTRANT -DQT_THREAD_SUPPORT" \
QMAKE_CXXFLAGS="$RPM_OPT_FLAGS -D_REENTRANT -DQT_THREAD_SUPPORT"
## Fix Qt3 destination directories
sed -i '13a QTDIR=%{_libdir}/qt-3.3' Makefile
make %{?_smp_mflags}
popd
%install
mkdir -p %{buildroot}%{_datadir}/%{name}-%{version}/samples
mkdir -p %{buildroot}%{_datadir}/%{name}-%{version}/animation
mkdir -p %{buildroot}%{_datadir}/%{name}-%{version}/img
mkdir -p %{buildroot}%{_datadir}/%{name}-%{version}/usermanual
mkdir -p %{buildroot}%{_datadir}/applications
mkdir -p %{buildroot}%{_datadir}/icons/%{name}
2015-01-15 17:20:00 +00:00
mkdir -p %{buildroot}%{_datadir}/pixmaps
2013-11-13 20:58:45 +00:00
mkdir -p %{buildroot}%{_bindir}
install -p -m 755 bin/engauge %{buildroot}%{_bindir}
install -p -m 755 utility/transpose/transpose %{buildroot}%{_bindir}
install -p -m 644 samples/* %{buildroot}%{_datadir}/%{name}-%{version}/samples
install -p -m 644 src/img/* %{buildroot}%{_datadir}/%{name}-%{version}/img
install -p -m 644 usermanual/* %{buildroot}%{_datadir}/%{name}-%{version}/usermanual
install -p -m 644 animation/* %{buildroot}%{_datadir}/%{name}-%{version}/animation
install -p -m 644 src/img/digitizer.ico %{buildroot}%{_datadir}/icons/%{name}
2015-01-15 17:20:00 +00:00
install -p -m 644 src/img/digitizer.svg %{buildroot}%{_datadir}/pixmaps
install -Dm0644 %{name}.appdata.xml %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
2013-11-13 20:58:45 +00:00
## Desktop file installation
2015-01-15 17:20:00 +00:00
desktop-file-edit \
--set-key=Exec --set-value="env ENGAUGE_BROWSER=firefox engauge -manual %{_datadir}/%{name}-%{version}/usermanual" \
--set-icon=digitizer \
%{name}.desktop
desktop-file-install --dir=${RPM_BUILD_ROOT}%{_datadir}/applications %{name}.desktop
%check
appstream-util validate-relax --nonet %{buildroot}%{_datadir}/appdata/%{name}.appdata.xml
2013-11-13 20:58:45 +00:00
%post
2015-01-15 17:20:00 +00:00
/bin/touch --no-create %{_datadir}/icons/%{name} &>/dev/null || :
/usr/bin/update-desktop-database &> /dev/null || :
2013-11-13 20:58:45 +00:00
%postun
if [ $1 -eq 0 ] ; then
2015-01-15 17:20:00 +00:00
/bin/touch --no-create %{_datadir}/icons/%{name} &>/dev/null
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/%{name} &>/dev/null || :
2013-11-13 20:58:45 +00:00
fi
2015-01-15 17:20:00 +00:00
/usr/bin/update-desktop-database &> /dev/null || :
2013-11-13 20:58:45 +00:00
%posttrans
2015-01-15 17:20:00 +00:00
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/%{name} &>/dev/null || :
2013-11-13 20:58:45 +00:00
%files
2015-01-15 17:20:00 +00:00
%doc README RELEASE
%license LICENSE
2013-11-13 20:58:45 +00:00
%{_bindir}/engauge
%{_datadir}/icons/%{name}/
2015-01-15 17:20:00 +00:00
%{_datadir}/pixmaps/digitizer.svg
%{_datadir}/appdata/%{name}.appdata.xml
2013-11-13 20:58:45 +00:00
%{_datadir}/applications/%{name}.desktop
%{_datadir}/%{name}-%{version}/
%files transpose
%doc utility/transpose/README
2015-01-15 17:20:00 +00:00
%license LICENSE
2013-11-13 20:58:45 +00:00
%{_bindir}/transpose
%changelog
2015-01-15 17:20:00 +00:00
* Thu Jan 15 2015 Antonio Trande <sagitter@fedoraproject.org> - 5.2-6.20150115git28de7d
- Update to commit 28de7d
- Package appdata and SVG files
- data sub-package incorporated in the main one
- Used the new macro %%license
* Sat Aug 16 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_22_Mass_Rebuild
* Sat Jun 07 2014 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 5.2-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_21_Mass_Rebuild
2013-11-13 20:58:45 +00:00
* Wed Nov 13 2013 Antonio Trande <sagitter@fedoraproject.org> 5.2-3
- Data files splitted into a noarch -data subpackage
- .h/.cpp files not packaged anymore
* Tue Nov 12 2013 Antonio Trande <sagitter@fedoraproject.org> 5.2-2
- Fix 'src/pointset.cpp' compilation error in EPEL
- Defined Qt3/Qt4 qmake
- Fix BR Qt4 for EPEL
- RPM_OPT_FLAGS fixed without patches
* Sun Nov 10 2013 Antonio Trande <sagitter@fedoraproject.org> 5.2-1
- First package