File wattwaechter.spec of Package wattwaechter
#
# spec file for package wattwaechter
#
# Copyright (c) 2025 SUSE LLC and contributors
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: wattwaechter
Version: 2.01
Release: 0
Summary: Tool for evaluation of amateur radio station electromagnetic field emmissions
License: SUSE-Freeware
URL: https://www.bundesnetzagentur.de/DE/Fachthemen/Telekommunikation/Technik/EMF/start.html
Source0: https://data.bundesnetzagentur.de/Bundesnetzagentur/SharedDocs/Downloads/DE/Sachgebiete/Telekommunikation/Verbraucher/ElektromagnetischeFelder/Wattwaechter/WW_Version_%{version}.zip
Source1: LICENSE.eml
Source2: https://www.bundesnetzagentur.de/SharedDocs/Downloads/DE/Sachgebiete/Telekommunikation/Verbraucher/ElektromagnetischeFelder/Wattwaechter/ww_afu_beschreibung.pdf#/README.pdf
Source3: https://www.bundesnetzagentur.de/SharedDocs/Downloads/DE/Sachgebiete/Telekommunikation/Verbraucher/ElektromagnetischeFelder/Anzeige_Afu/anleitung_anzeige20160616.pdf#/anleitung_anzeige_BEMFV.pdf
Source4: https://www.bundesnetzagentur.de/SharedDocs/Downloads/DE/Sachgebiete/Telekommunikation/Verbraucher/ElektromagnetischeFelder/Wattwaechter/3d_berechnung.pdf#/3d_berechnung_antennencharakteristik_und_exposition.pdf
Source5: https://www.bundesnetzagentur.de/SharedDocs/Downloads/DE/Sachgebiete/Telekommunikation/Verbraucher/ElektromagnetischeFelder/Anzeige_Afu/studie_afu20160616.pdf#/studie_vereinfachtes_bewertungsverfahren_schutzabstaende_bei_amateurfunkanlagen.pdf
BuildRequires: fdupes
BuildRequires: unzip
Requires: java
BuildArch: noarch
%description
This tool is released by the German Bundesnetzagentur (Federal Network Agency)
to helps amateur radio operators of stationary stations to create the BEMFV
report confirming that their radio station adheres to the personal exposure
limits of electromagnetic fields.
%prep
%autosetup -n WW_Version_%{version}
rmdir UserData
mkdir rpmtmp
cp %{SOURCE1} %{SOURCE2} %{SOURCE3} %{SOURCE4} %{SOURCE5} rpmtmp/
rm -v *.pdf
%build
cat > ../wattwaechter <<EOF
#!/bin/sh
exec java -Dswing.aatext=true -Dawt.useSystemAAFontSettings=on -jar %{_datadir}/wattwaechter/wattwaechter_%{version}.jar $@
EOF
#java -Dswing.aatext=true -Dawt.useSystemAAFontSettings=on -Dswing.systemlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -Dswing.defaultlaf=com.sun.java.swing.plaf.gtk.GTKLookAndFeel -jar wattwaechter_2.01.jar
%install
cd ..
install -Dm755 wattwaechter %{buildroot}/%{_bindir}/wattwaechter
mkdir -p %{buildroot}%{_datadir}/
cp -rv WW_Version_%{version} %{buildroot}%{_datadir}/wattwaechter
rm -r %{buildroot}%{_datadir}/wattwaechter/rpmtmp
%fdupes %{buildroot}
%files
%license rpmtmp/LICENSE.eml
%doc rpmtmp/*.pdf
%{_datadir}/wattwaechter
%{_bindir}/wattwaechter
%changelog