%global release_date 22.05.2014 %global default_aurl ftp://tsi0013:wrqttr@210.68.183.169/ %global the_icon_file %{_datadir}/icons/hicolor/128x128/apps/bt747.png Name: BT747 Version: 2.1.3 Release: 6%{dist} Summary: GPS Datalogger for MTK based devices License: GPLv2+ URL: http://www.bt747.org Source0: http://downloads.sourceforge.net/project/bt747/Stable/%{name}_%{version}_full.zip Source1: http://www.bt747.org/icon/bt747_128x128.gif Source2: bt747.desktop Source3: %{name}-pom.xml.in Patch0: %{name}-2.1.3-swingx.patch BuildRequires: jpackage-utils BuildRequires: java-devel >= 1:1.7.0 BuildRequires: maven-local BuildRequires: xmvn BuildRequires: maven-clean-plugin BuildRequires: maven-dependency-plugin BuildRequires: maven-install-plugin BuildRequires: javamail BuildRequires: jopt-simple BuildRequires: rxtx BuildRequires: swing-layout BuildRequires: swingx BuildRequires: ImageMagick BuildRequires: desktop-file-utils BuildRequires: zip BuildArch: noarch Requires: jpackage-utils Requires: java >= 1:1.7.0 Requires: javamail Requires: jopt-simple Requires: rxtx Requires: swing-layout Requires: swingx %description GPS Data Logger for MTK based devices which allows you to: - Download recorded GPS Tracks - Compatible with most GPS Data Loggers or Tracking Devices using the MTK chipset. - Convert GPS position data in many formats (HTML (Google Maps API), GPX, KML, KMZ, ...) - Geotag JPG pictures and position any other filetype on the map (voice, documents, ...) - Handheld Devices (Palm, WinCE, Mobile Phones supporting Java (J2ME)) support - Desktops (Windows, MacOSX, Linux flavors) support - Configure MTK Chipset Based Devices and GPS Loggers - Real Time Tracking as explained in GPS Tracking - AGPS(EPO) data upload to MTK II Chipset Based Devices and GPS Loggers (2.X version). - Bluetooth support (within some limitations) - Upload to OpenStreetMap directly for fast access to your tracks while mapping %prep %setup -qc # unbundling swingx is not ready # % patch0 -p1 -b .swingx # zip -d lib/swingx-ws.jar META-INF/MYSELF.* rm -rf dev dist nbproject rm -f *.pdb *.exe *.command *.bat *.sh rm -rf lib/rxtx* lib/win32* rm -f lib/RXTX* lib/comm* lib/jopt-simple-2.4.1.jar mkdir -p .build/%{name}/src/main/{java,resources} ln -sf ../../../../../{src,src_j2se,src_rxtx,src_waba} .build/%{name}/src/main/java/ ln -sf ../../lib .build/%{name}/lib convert "%{SOURCE1}" "bt747.png" mkdir -p .build/%{name}/src/test/{java,resources} sed "s/@VERSION@/%{version}/" <%{SOURCE3} >.build/%{name}/pom.xml # set build date, release date and version sed -i "s/00000000000000000/$(date +%Y%m%d%H%M%S000)/" .build/%{name}/src/main/java/src/bt747/Version.java sed -i "s/\(DATE = \"\)\(.*\)\(\"\)/\1%{release_date}\3/" .build/%{name}/src/main/java/src/bt747/Version.java sed -i "s/\.DEVELOPMENTVERSION/%{version}-%{release}/" .build/%{name}/src/main/java/src/bt747/Version.java sed -i "s/\(VERSION_NUMBER = \"\)\(.*\)\(\"\)/\1%{version}\3/" .build/%{name}/src/main/java/src/bt747/Version.java sed -i "s#\(AURL = \"\)\(.*\)\(\"\)#\1%{default_aurl}\3#" .build/%{name}/src/main/java/src/bt747/Version.java %build pushd .build/%{name} mvn-local package popd %install mkdir -p %{buildroot}%{_javadir} install -p .build/%{name}/target/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar install -p lib/collections-superwaba.jar %{buildroot}%{_javadir}/%{name}-collections-superwaba.jar install -p lib/Waba_only.jar %{buildroot}%{_javadir}/%{name}-Waba_only.jar install -p lib/jchart2d-3.1.0.jar %{buildroot}%{_javadir}/%{name}-jchart2d-3.1.0.jar install -p lib/swingx-ws.jar %{buildroot}%{_javadir}/%{name}-swingx-ws.jar install -p lib/jcalendar-1.3.2.jar %{buildroot}%{_javadir}/%{name}-jcalendar-1.3.2.jar install -p lib/sanselan-0.97-incubator.jar %{buildroot}%{_javadir}/%{name}-sanselan-0.97-incubator.jar install -p lib/swingx.jar %{buildroot}%{_javadir}/%{name}-swingx.jar install -pD bt747.png %{buildroot}/%{the_icon_file} desktop-file-install \ --dir=${RPM_BUILD_ROOT}%{_datadir}/applications \ %{SOURCE2} # unbundling swingx is not ready # %jpackage_script bt747.j2se_view.BT747Main "" "" %{name}:swingx-graphics:swingx-core:swingx-common:swing-layout:RXTXcomm:javax.mail:%{name}-collections-superwaba:%{name}-Waba_only:jopt-simple:%{name}-jchart2d-3.1.0:%{name}-swingx-ws:%{name}-jcalendar-1.3.2:%{name}-sanselan-0.97-incubator bt747 true %jpackage_script bt747.j2se_view.BT747Main "" "" %{name}:%{name}-swingx:swing-layout:RXTXcomm:javax.mail:%{name}-collections-superwaba:%{name}-Waba_only:jopt-simple:%{name}-jchart2d-3.1.0:%{name}-swingx-ws:%{name}-jcalendar-1.3.2:%{name}-sanselan-0.97-incubator bt747 true %post /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || : /usr/bin/update-mime-database %{_datadir}/mime &> /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 /usr/bin/update-mime-database %{_datadir}/mime &> /dev/null || : %posttrans /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || : %files %doc COPYING README.txt ChangeLog.txt %{_javadir}/*.jar %{_bindir}/bt747 %{_datadir}/applications/bt747.desktop %{the_icon_file} %changelog * Wed Oct 18 2017 Damian Wrobel - 2.1.3-6 - Do not use hardcoded path for RXTXcomm.jar * Sat Jun 18 2016 Damian Wrobel - 2.1.3-5 - Add default AURL (for AGPS) * Sat Aug 29 2015 Damian Wrobel - 2.1.3-4 - stop using mvn-rpmbuild * Wed Sep 24 2014 Damian Wrobel - 2.1.3-3 - use bundled swingx - unbundled causes exceptions * Sun Sep 21 2014 Damian Wrobel - 2.1.3-2 - unbundle swingx, swing-layout * Sat Sep 20 2014 Damian Wrobel - 2.1.3-1 - update to the 2.1.3 version * Fri Feb 28 2014 Damian Wrobel - 2.1.0-1 - update to the 2.1.0 version * Wed Jul 31 2013 Damian Wrobel - 2.0.3-3 - runnable version * Wed Jul 31 2013 Damian Wrobel - 2.0.3-2 - install & files sections updated. * Mon Jul 29 2013 Damian Wrobel - 2.0.3-1 - Initial RPM release.