opa-fmgui/opa-fmgui.spec

155 lines
5.4 KiB
RPMSpec

#
# spec file for package opa-fmgui
#
# Copyright (c) 2016 SUSE LINUX GmbH, Nuernberg, Germany.
# Copyright (c) 2015 Intel Corporation
#
# 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 http://bugs.opensuse.org/
#
%define name opa-fmgui
%define appdir .
%define appfolder opa-fmgui
%define appjar opa-fmgui.jar
%define _binary_payload w9.gzdio
Name: opa-fmgui
Version: 10.1.0.0
Release: 0
Summary: Fabric Manager Graphical User Interface
License: BSD-3-Clause and LGPL-2.0+
Group: Applications/System
Url: http://www.intel.com/
Source0: opa-fmgui.tar.gz
Source1: jsch-0.1.53.jar
Source2: swingx-all-1.6.5.jar
Source3: swingx-action-1.6.5.jar
Source4: swingx-autocomplete-1.6.5.jar
Source5: swingx-beaninfo-1.6.5.jar
Source6: swingx-common-1.6.5.jar
Source7: swingx-core-1.6.5.jar
Source8: swingx-graphics-1.6.5.jar
Source9: swingx-mavensupport-1.6.5.jar
Source10: swingx-painters-1.6.5.jar
Source11: swingx-plaf-1.6.5.jar
Source12: swingx-testsupport-1.6.5.jar
Source13: gradle-3.5-bin.zip
Patch1: gradle-use_local_repo.patch
Patch3: opa-fmgui-intel-manifest-license.patch
Patch5: stl-14927-jgraphx-update.patch
BuildRequires: ant
BuildRequires: jre >= 1.7
Requires: jre >= 1.7
Requires: mlocate
BuildRequires: libgnome
BuildRequires: openssl
BuildRequires: update-desktop-files
BuildRequires: wget
BuildRequires: unzip
# BuildRequires: gradle
BuildRoot: %{_tmppath}/%{name}-%{version}-build
BuildArch: noarch
%description
FMGUI is the Fabric Manager Graphical User Interface. It can be run by invoking the Bash
script fmgui.
%prep
%setup -q -n opa-fmgui
%patch1 -p1
%patch3 -p1
%patch5 -p1
%build
find / -name gradle-3.5-bin.zip 2>/dev/null
(cd %{_tmppath}; unzip $(find / -name gradle-3.5-bin.zip 2>/dev/null))
GRADLE_LIB_DIR=$RPM_SOURCE_DIR
export GRADLE_LIB_DIR
%{_tmppath}/gradle-3.5/bin/gradle copyDeps build --info
%install
mkdir -p %{buildroot}%{_javadir}/%{appfolder}
mkdir -p %{buildroot}%{_javadir}/%{appfolder}/lib
mkdir -p %{buildroot}%{_javadir}/%{appfolder}/help
mkdir -p %{buildroot}%{_javadir}/%{appfolder}/util
mkdir -p %{buildroot}%{_sysconfdir}/xdg/menus/applications-merged
mkdir -p %{buildroot}%{_bindir}
mkdir -p %{buildroot}%{_sysconfdir}/profile.d
mkdir -p %{buildroot}/%{_datadir}/doc/%{name}/
# mkdir -p %%{buildroot}/%%{_datadir}/doc/%%{name}/licenses
mkdir -p %{buildroot}/%{_datadir}/icons/hicolor
mkdir -p %{buildroot}/%{_datadir}/applications
mkdir -p %{buildroot}%{_datadir}/desktop-directories
install -m 755 %{appdir}/%{appjar} %{buildroot}%{_javadir}/%{appfolder}
# cp %%{appdir}/LICENSE %%{buildroot}/%%{_datadir}/doc/%%{name}/
# cp %%{appdir}/THIRD-PARTY-README %%{buildroot}/%%{_datadir}/doc/%%{name}/
# cp %%{appdir}/Third_Party_Copyright_Notices_and_Licenses %%{buildroot}/%%{_datadir}/doc/%%{name}/
# cp -r %%{appdir}/licenses %%{buildroot}/%%{_datadir}/doc/%%{name}/
install -m 644 -pDt %{buildroot}/%{_javadir}/%{appfolder}/lib %{appdir}/lib/*
cp -a %{appdir}/target/help/* %{buildroot}%{_javadir}/%{appfolder}/help
cp %{appdir}/help/*.html %{buildroot}%{_javadir}/%{appfolder}/help
#cp %%{appdir}/help/LICENSE %%{buildroot}%%{_javadir}/%%{appfolder}/help
install -m 755 %{appdir}/util/fmguiclear.sh %{buildroot}%{_javadir}/%{appfolder}/util
install -m 755 %{appdir}/util/postsetup.sh %{buildroot}%{_javadir}/%{appfolder}/util
cp -a %{appdir}/util/ClearFMGUICache.desktop %{buildroot}%{_javadir}/%{appfolder}/util
install -m 755 %{appdir}/install/opa-fmgui.sh %{buildroot}%{_bindir}/opa-fmgui
#for fmgui.desktop
cp -a %{appdir}/install/fmguivars.sh %{buildroot}/%{_sysconfdir}/profile.d
cp -a %{appdir}/install/fmgui.desktop %{buildroot}
cp -a %{appdir}/install/Fabric.directory %{buildroot}%{_datadir}/desktop-directories
cp -a %{appdir}/install/images/* %{buildroot}/%{_datadir}/icons/hicolor
cp -a %{appdir}/install/Fabric.menu %{buildroot}/%{_sysconfdir}/xdg/menus/applications-merged
%suse_update_desktop_file -i fmgui Utility Filesystem
rm %{buildroot}/fmgui.desktop
%post
%desktop_database_post
%icon_theme_cache_post
%postun
%desktop_database_postun
%icon_theme_cache_postun
%files
%defattr(-,root,root,-)
%doc README THIRD-PARTY-README Third_Party_Copyright_Notices_and_Licenses
%license LICENSE gritty/gritty_license.txt
%dir %{_sysconfdir}/xdg/menus
%dir %{_datadir}/desktop-directories
%dir %{_datadir}/doc/opa-fmgui
%dir %{_sysconfdir}/xdg/menus/applications-merged
%{_javadir}/%{appfolder}
%{_bindir}/opa-fmgui
%{_datadir}/applications/*.desktop
# %%{_datadir}/doc/%%{name}/*
%{_datadir}/desktop-directories/Fabric.directory
%{_datadir}/icons/hicolor
# %%license %%{_datadir}/doc/opa-fmgui/LICENSE
# %%license %%{_datadir}/doc/opa-fmgui/licenses/*
%config %{_sysconfdir}/xdg/menus/applications-merged/Fabric.menu
%config %{_sysconfdir}/profile.d/fmguivars.sh
%changelog