File ICAClient.spec of Package ICAClient

# spec file for package ICAClient
# Copyright (c) 2014 SUSE LINUX Products GmbH, Nuernberg, Germany.
# 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

Name:           ICAClient
BuildRequires:  fdupes
BuildRequires:  shared-mime-info
BuildRequires:  update-desktop-files
%ifarch x86_64
BuildRequires:  krb5-32bit
Requires:       gstreamer-0_10-32bit >= 0.10.25
Requires:       krb5-32bit
Requires:       libcurl4-32bit
Requires:       libpcsclite1-32bit
Requires:       libpng12-0-32bit
Requires:       libwebkitgtk-1_0-0-32bit
Requires:       libxerces-c-3_1-32bit
BuildRequires:  krb5
Requires:       gstreamer-0_10 >= 0.10.25
Requires:       krb5
Requires:       libcurl4
Requires:       libpcsclite1
Requires:       libpng12-0
Requires:       libwebkitgtk-1_0-0
Requires:       libxerces-c-3_1
ExclusiveArch:  %ix86 x86_64
Version:        13.0
Release:        0.<RELEASE3>
Summary:        Citrix Client
License:        SUSE-NonFree
Group:          Productivity/Networking/Other
PreReq:         /usr/bin/update-mime-database
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
Source0:        ICAClient-
Source1:        selfservice.desktop
Source2:        conncenter.desktop
Source3:        configmgr.desktop
Source4:        wfica.desktop
Source5:        ICAClient.xml
Provides:       ICAClient = %{version}

Citrix ICA Client

    Citrix System International GmbH

%define _use_internal_dependency_generator 0
%define __find_requires env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-requires | sed -e "/libavcodec/d" -e "/libavutil/d" ; } '
%define __find_provides env sh -c 'filelist=($(cat)) && { printf "%s\\n" "${filelist[@]}" | /usr/lib/rpm/find-provides | sed -e "/libavcodec/d" -e "/libavutil/d" -e "/libavformat/d" ; } '



%ifarch x86_64
tar xfv %SOURCE0 -C "${RPM_BUILD_ROOT}"
find $RPM_BUILD_ROOT -type d | xargs chmod 755
mkdir -p ${RPM_BUILD_ROOT}/usr/share/applications
rm -f ${RPM_BUILD_ROOT}/usr/share/applications/*.desktop
cp %SOURCE1 ${RPM_BUILD_ROOT}/usr/share/applications/
cp %SOURCE2 ${RPM_BUILD_ROOT}/usr/share/applications/
cp %SOURCE3 ${RPM_BUILD_ROOT}/usr/share/applications/
cp %SOURCE4 ${RPM_BUILD_ROOT}/usr/share/applications/
mkdir -p ${RPM_BUILD_ROOT}/usr/share/mime/packages
cp %SOURCE5 ${RPM_BUILD_ROOT}/usr/share/mime/packages
install -d -m 755 ${RPM_BUILD_ROOT}%{_docdir}/%{name}
mv -f ${RPM_BUILD_ROOT}/usr/doc/* ${RPM_BUILD_ROOT}%{_docdir}/%{name}
ln -s /usr/lib/  ${RPM_BUILD_ROOT}/usr/lib/
### integrate Gstreamer
mkdir -p ${RPM_BUILD_ROOT}/usr/lib/gstreamer-0.10
pushd ${RPM_BUILD_ROOT}/usr/lib/ICAClient/util
ln -sf libgstflatstm.${ICA_GSTLIB_EXT}.so
ln -sf gst_play.${ICA_GSTLIB_EXT} gst_play
ln -sf gst_read.${ICA_GSTLIB_EXT} gst_read
if [ ${ICA_GSTLIB_EXT} -eq 32 ];then
# clear libs for requires checking
rm -f libgstflatstm.${ICA_GSTLIB_EXT}.so
rm -f gst_play.${ICA_GSTLIB_EXT}
rm -f gst_read.${ICA_GSTLIB_EXT}
ln -sf /usr/lib/ICAClient/util/ ${RPM_BUILD_ROOT}/usr/lib/gstreamer-0.10/
# dismiss the exec proptery for skip rpath check error
chmod a-x ${RPM_BUILD_ROOT}/usr/lib/ICAClient/VDHSSPI.DLL
chmod a-x ${RPM_BUILD_ROOT}/usr/lib/ICAClient/lib/
chmod a-x ${RPM_BUILD_ROOT}/usr/lib/ICAClient/lib/
chmod a-x ${RPM_BUILD_ROOT}/usr/lib/ICAClient/VDMSSPI.DLL
chmod a-x ${RPM_BUILD_ROOT}/usr/lib/ICAClient/selfservice
# for boot scripts check error
sed -i -e "/^### BEGIN INIT INFO/,/^### END INIT INFO/{s/^# Required-Stop:/# Required-Stop:     \$null/;}" ${RPM_BUILD_ROOT}/etc/init.d/ctxusbd
%suse_update_desktop_file wfica
%suse_update_desktop_file selfservice
%suse_update_desktop_file configmgr
%suse_update_desktop_file conncenter
%fdupes -s ${RPM_BUILD_ROOT}

chmod a+x /usr/lib/ICAClient/VDHSSPI.DLL
chmod a+x /usr/lib/ICAClient/lib/
chmod a+x /usr/lib/ICAClient/lib/
chmod a+x /usr/lib/ICAClient/VDMSSPI.DLL
chmod a+x /usr/lib/ICAClient/selfservice
export ICAROOT=/usr/lib/ICAClient
%{?fillup_and_insserv:%fillup_and_insserv -f ctxusbd}

%{?stop_on_removal:%stop_on_removal ctxusbd}

rm -rf /etc/icalicense


%dir /usr/lib/gstreamer-0.10
%dir /usr/lib/udev
%dir /usr/lib/udev/rules.d
%config /usr/lib/udev/rules.d/85-ica-usb.rules
%config %{_sysconfdir}/init.d/ctxusbd
%doc %{_docdir}

openSUSE Build Service is sponsored by