Blame opa-fmgui.spec

4983093
#
4983093
# Spec file for Package opa-fmgui
4983093
#
4983093
4983093
# Copyright (c) 2015, Intel Corporation
4983093
# All rights reserved.
4983093
# 
4983093
# Redistribution and use in source and binary forms, with or without modification,
4983093
# are permitted provided that the following conditions are met:
4983093
# - Redistributions of source code must retain the above copyright notice,
4983093
#   this list of conditions and the following disclaimer.
4983093
# - Redistributions in binary form must reproduce the above copyright notice,
4983093
#   this list of conditions and the following disclaimer in the documentation
4983093
#   and/or other materials provided with the distribution.
4983093
# - Neither the name of Intel Corporation nor the names of its contributors may
4983093
#   be used to endorse or promote products derived from this software without
4983093
#   specific prior written permission.
4983093
# 
4983093
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
4983093
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
4983093
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
4983093
# ARE DISCLAIMED. IN NO EVENT SHALL INTEL, THE COPYRIGHT OWNER OR CONTRIBUTORS
4983093
# BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
4983093
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
4983093
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
4983093
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
4983093
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
4983093
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
4983093
# POSSIBILITY OF SUCH DAMAGE.
4983093
# 
4983093
# EXPORT LAWS: THIS LICENSE ADDS NO RESTRICTIONS TO THE EXPORT LAWS OF YOUR
4983093
# JURISDICTION. It is licensee's responsibility to comply with any export
4983093
# regulations applicable in licensee's jurisdiction. Under CURRENT (May 2000)
4983093
# U.S. export regulations this software is eligible for export from the U.S.
4983093
# and can be downloaded by or otherwise exported or reexported worldwide EXCEPT
4983093
# to U.S. embargoed destinations which include Cuba, Iraq, Libya, North Korea,
4983093
# Iran, Syria, Sudan, Afghanistan and any other country to which the U.S. has
4983093
# embargoed goods and services.
4983093
4983093
%global appfolder opa-fmgui
4983093
%global appjar opa-fmgui.jar
4983093
4983093
Name:           opa-fmgui
4983093
Version:        10.1.0.0
4983093
Release:        112%{?dist}
4983093
Summary:        Intel Omni-Path Architecture Fabric Manager Graphical User Interface
4983093
Group:          Applications/System
4983093
License:        BSD and LGPLv2+
4983093
URL:            https://github.com/01org/opa-fmgui
4983093
Source0:        %{name}-%{version}.tar.gz 
4983093
BuildArch:      noarch
4983093
4983093
BuildRequires: gradle-local
4983093
BuildRequires: maven-local
4983093
BuildRequires: javapackages-local
4983093
BuildRequires: javapackages-tools
4983093
BuildRequires: ant
4983093
BuildRequires: mvn(log4j:log4j)
4983093
BuildRequires: mvn(org.hibernate.common:hibernate-commons-annotations)
4983093
BuildRequires: mvn(org.hibernate:hibernate-core)
4983093
BuildRequires: mvn(org.hibernate:hibernate-entitymanager)
4983093
BuildRequires: mvn(org.hibernate.javax.persistence:hibernate-jpa-2.1-api)
4983093
BuildRequires: mvn(org.hsqldb:hsqldb)
4983093
BuildRequires: mvn(org.jboss:jandex)
4983093
BuildRequires: mvn(com.sun.mail:javax.mail)
4983093
BuildRequires: mvn(org.slf4j:log4j-over-slf4j)
4983093
BuildRequires: mvn(org.slf4j:slf4j-api)
4983093
BuildRequires: mvn(ch.qos.logback:logback-classic)
4983093
BuildRequires: mvn(ch.qos.logback:logback-core)
4983093
BuildRequires: mvn(org.jfree:jfreechart)
4983093
BuildRequires: mvn(org.swinglabs.swingx:swingx-all)
4983093
BuildRequires: mvn(org.jfree:jcommon)
4983093
BuildRequires: mvn(javax.help:javahelp)
4983093
BuildRequires: mvn(org.jboss.logging:jboss-logging)
4983093
BuildRequires: mvn(org.jboss.logging:jboss-logging-annotations)
4983093
BuildRequires: mvn(org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec)
4983093
BuildRequires: mvn(org.javassist:javassist)
4983093
BuildRequires: mvn(dom4j:dom4j)
4983093
BuildRequires: mvn(antlr:antlr)
4983093
BuildRequires: mvn(com.jcraft:jsch)
4983093
BuildRequires: mvn(net.engio:mbassador)
4983093
BuildRequires: mvn(com.mxgraph:jgraphx)
4983093
BuildRequires: desktop-file-utils
4983093
4983093
Requires: jre >= 1.7
4983093
Requires: mvn(log4j:log4j)
4983093
Requires: mvn(org.hibernate.common:hibernate-commons-annotations)
4983093
Requires: mvn(org.hibernate:hibernate-core)
4983093
Requires: mvn(org.hibernate:hibernate-entitymanager)
4983093
Requires: mvn(org.hibernate.javax.persistence:hibernate-jpa-2.1-api)
4983093
Requires: mvn(org.hsqldb:hsqldb)
4983093
Requires: mvn(org.jboss:jandex)
4983093
Requires: mvn(com.sun.mail:javax.mail)
4983093
Requires: mvn(org.slf4j:log4j-over-slf4j)
4983093
Requires: mvn(org.slf4j:slf4j-api)
4983093
Requires: mvn(ch.qos.logback:logback-classic)
4983093
Requires: mvn(ch.qos.logback:logback-core)
4983093
Requires: mvn(org.jfree:jfreechart)
4983093
Requires: mvn(org.jfree:jcommon)
4983093
Requires: mvn(javax.help:javahelp)
4983093
Requires: mvn(org.jboss.logging:jboss-logging)
4983093
Requires: mvn(org.jboss.logging:jboss-logging-annotations)
4983093
Requires: mvn(org.jboss.spec.javax.transaction:jboss-transaction-api_1.2_spec)
4983093
Requires: mvn(org.javassist:javassist)
4983093
Requires: mvn(dom4j:dom4j)
4983093
Requires: mvn(antlr:antlr)
4983093
Requires: mvn(com.jcraft:jsch)
4983093
Requires: mvn(net.engio:mbassador)
4983093
Requires: mvn(com.mxgraph:jgraphx)
4983093
Requires: mvn(org.swinglabs.swingx:swingx-all)
4983093
4983093
# Filter all jar files, except "gritty.jar".
4983093
%global __provides_exclude_from ^%{_javadir}/%{appfolder}/lib/[^(gritty)].*.jar$
4983093
4983093
%description
4983093
FMGUI is the Intel Omni-Path Architecture Fabric Manager Graphical User 
4983093
Interface. It can be run by invoking the Bourne shell script opa-fmgui.
4983093
4983093
%prep
4983093
%autosetup -n %{name}-%{version}
4983093
%setup  -q
4983093
4983093
%build
4983093
%if 0%{?fedora} >= 24
4983093
    %gradle_build -i copyDeps
4983093
%else
4983093
    gradle --offline copyDeps build
4983093
%endif
4983093
4983093
%install
4983093
4983093
%mvn_install
4983093
install -m 755 -pDt %{buildroot}/%{_javadir}/%{appfolder} %{appjar}
4983093
install -m 644 -pDt %{buildroot}/%{_javadir}/%{appfolder}/gritty gritty/build/libs/gritty.jar
4983093
install -m 644 -pDt %{buildroot}/%{_javadir}/%{appfolder}/lib lib/*
4983093
install -m 755 -pDt %{buildroot}/%{_javadir}/%{appfolder}/bin bin/buildlinks
4983093
install -m 755 -pDt %{buildroot}/%{_javadir}/%{appfolder}/help target/help/*
4983093
install -m 644 -pDt %{buildroot}/%{_javadir}/%{appfolder}/help help/*.html 
4983093
install -m 755 -pDt %{buildroot}/%{_javadir}/%{appfolder}/util util/fmguiclear.sh
4983093
install -m 755 -pDt %{buildroot}/%{_javadir}/%{appfolder}/util util/postsetup.sh
4983093
install -m 644 -pDt %{buildroot}/%{_javadir}/%{appfolder}/util util/ClearFMGUICache.desktop
4983093
install -m 755 -pD  install/opa-fmgui.sh %{buildroot}/%{_bindir}/opa-fmgui
4983093
install -m 644 -pDt %{buildroot}/%{_sysconfdir}/profile.d install/fmguivars.sh
4983093
install -m 644 -pDt %{buildroot}/%{_sysconfdir}/xdg/menus/applications-merged install/Fabric.menu
4983093
install -m 644 -pDt %{buildroot}%{_datadir}/desktop-directories install/Fabric.directory
4983093
install -m 644 -pDt %{buildroot}/%{_datadir}/icons/hicolor/32x32/apps install/images/32x32/apps/fmgui.png
4983093
install -m 644 -pDt %{buildroot}/%{_datadir}/icons/hicolor/48x48/apps install/images/48x48/apps/fmgui.png
4983093
for file in $(find resources/image -type f); do
4983093
    install -m 644 -pDt %{buildroot}/%{_datadir}/icons/hicolor $file
4983093
done
4983093
desktop-file-install --dir=%{buildroot}/%{_datadir}/applications install/fmgui.desktop
4983093
4983093
%post
4983093
/bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null || :
4983093
%{_javadir}/%{appfolder}/bin/buildlinks link
4983093
4983093
%postun
4983093
if [ $1 -eq 0 ] ; then
4983093
    echo
4983093
    echo "***********************************************************************"
4983093
    echo "NOTE: It is the user's responsibility to delete the opa-fmgui database "
4983093
    echo "See /<your-home-directory>/.Intel/FabricManagerGUI/fmguiclear.sh       "
4983093
    echo "***********************************************************************"
4983093
    echo
4983093
    /bin/touch --no-create %{_datadir}/icons/hicolor &>/dev/null
4983093
    /usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
4983093
fi
4983093
4983093
%posttrans
4983093
/usr/bin/gtk-update-icon-cache %{_datadir}/icons/hicolor &>/dev/null || :
4983093
4983093
%files
4983093
# For a breakdown of the licensing, see /usr/share/doc/opa-fmgui/THIRD-PARTY-README
4983093
%doc README THIRD-PARTY-README Third_Party_Copyright_Notices_and_Licenses
4983093
%license LICENSE gritty/gritty_license.txt
4983093
%{_javadir}/%{appfolder}
4983093
%{_bindir}/opa-fmgui
4983093
%{_datadir}/applications/fmgui.desktop
4983093
%{_datadir}/desktop-directories/Fabric.directory
4983093
%{_datadir}/icons/hicolor
4983093
%{_datadir}/icons/hicolor/32x32/apps/fmgui.png
4983093
%{_datadir}/icons/hicolor/48x48/apps/fmgui.png
4983093
%config(noreplace) %{_sysconfdir}/xdg/menus/applications-merged/Fabric.menu
4983093
%config(noreplace) %{_sysconfdir}/profile.d/fmguivars.sh
4983093
4983093
%changelog
4983093
* Wed Jul 20 2016 Rick Tierney <rick.tierney@intel.com> 10.1.0.0-112
4983093
- Update the release number to match opa-fmgui release
4983093
- Backout changes to buildlinks; symlinks violate Filesystem Hierachy Standard 
4983093
- Correct type in README file
4983093
4983093
* Thu Jul 14 2016 Rick Tierney <rick.tierney@intel.com> 10.1.0.0-1
4983093
- Updated buildlinks to include symbolic links to license files
4983093
- Updated revision number to match opa-fmgui version
4983093
4983093
* Thu Jun 23 2016 Rick Tierney <rick.tierney@intel.com> 10.0.0.0.3-6
4983093
- Fixed Revision and Release tags in the spec file
4983093
- Fixed the bogus date in the changelog
4983093
- Removed non-runtime files from install
4983093
- Removed individual listing of files under files in spec
4983093
- Added parent directory under files in spec
4983093
- Used the doc and license macros to copy non-runtime files to appropriate folders
4983093
- Changed License tag to include only relevant licenses
4983093
- Add some desktop/icon image files
4983093
4983093
* Wed Jun 22 2016 Rick Tierney <rick.tierney@intel.com> 10.0.0.0.3-5
4983093
- Fixed License tag to only reflect relevant licenses BSD and LGPL
4983093
- Moved comment about 3rd party library license breakdown to the files section
4983093
- Fixed the file duplication problem by not installing non-runtime files in the
4983093
  application directory, and reorganized the files by tagging licenses and
4983093
  documentation
4983093
4983093
* Tue Jun 21 2016 Rick Tierney <rick.tierney@intel.com> 10.0.0.0.3-4
4983093
- Libraries are now installed at runtime using Requires
4983093
- Removed 3rd party license files except for Gritty which is built
4983093
- Updated spec file to implement 3rd party library changes
4983093
- Added script to create symbolic links to the installed 3rd party jar files
4983093
4983093
* Mon Jun 06 2016 Rick Tierney <rick.tierney@intel.com> 10.0.0.0.3-3
4983093
- Removed 3rd party jar files, libraries will be installed at runtime
4983093
- Moved licenses from the lic folder to the license folder
4983093
  
4983093
* Thu Jun 02 2016 Rick Tierney <rick.tierney@intel.com> 10.0.0.0.3-2
4983093
- Updated to fix license issues
4983093
4983093
* Wed Apr 06 2016 Robert Amato <robert.amato@intel.com> 10.0.0.0.3-1
4983093
- Remove Intel branding