here is rpm spec that I used for my client,
(worked with OpenSuSE 10.3, and used createrepo)
1. download www.sap.com - ftp://ftp.sap.com/pub/sapgui/java/710r2/PlatinGUI-Linux-710r2.jar
2. install as usually with java -jar in linux
3. run this prepare.sh
# ./prepare.sh 7.10rev2
(this will create SAPGUI7.10rev in directory /usr/src/packages/SOURCES)
file prepare.sh
----
#!/bin/sh
cd /opt/SAPClients/SAPGUI$1
cp -p /usr/share/applications/SAPGUI$1.desktop ./
cd /opt/SAPClients/
tar cfvz SAPGUI$1.tar.gz SAPGUI$1
#cp -p SAPGUI$1.tar.gz /usr/src/redhat/SOURCES
cp -p SAPGUI$1.tar.gz /usr/src/packages/SOURCES
----
4. create file SAPGUI.spec
file SAPGUI.spec
----
#change version number in pkgrelease and _platinguipath
%define pkgrelease 7.10rev2
%define dwrelease 710r2
%define microrelease 2
%define _platinguipath /opt/SAPClients/SAPGUI7.10rev2
Name: SAPGUI
Version: Linux
Release: %{pkgrelease}.%{microrelease}
License: GPL
Group: Applications/Databases/Interfaces
Source0: ftp://ftp.sap.com/pub/sapgui/java/%{pkgrelease}/PLATINGUI-Linux-%{dwrelease}.tar.gz
URL: http://www.sap.com
Buildarch: noarch
BuildRoot: %{_tmppath}/%{name}-root
Summary: PlatinGUI client Linux
%description
SAPGUI client java environment for linux
%prep
%setup -q -n %{name}%{pkgrelease}
%build
%install
[ "${RPM_BUILD_ROOT}" != "/" ] && [ -d "${RPM_BUILD_ROOT}" ] && \
rm -rf "${RPM_BUILD_ROOT}"
# Create directories.
install -d "${RPM_BUILD_ROOT}%{_platinguipath}"/{bin,jar,inst,security,doc}
install -d "${RPM_BUILD_ROOT}%{_platinguipath}"/bin/gmux
install -d "${RPM_BUILD_ROOT}%{_platinguipath}"/inst/hicolor
install -d "${RPM_BUILD_ROOT}%{_platinguipath}"/inst/hicolor/{128x128,16x16,22x22,32x32,48x48,64x64}
install -d "${RPM_BUILD_ROOT}%{_platinguipath}"/inst/hicolor/{128x128,16x16,22x22,32x32,48x48,64x64}/apps
install -d "${RPM_BUILD_ROOT}%{_platinguipath}"/doc/{applet,intro,relnotes,sysreq,webdynpro,admconf,backgrnd,install,license,start,userconf}
install -d "${RPM_BUILD_ROOT}/usr/share/applications"
# Install files.
install install.* "${RPM_BUILD_ROOT}%{_platinguipath}"/
install bin/{guilogon,guistart,libGnomeConnect.so,libJPlatin.so,libKde3Connect.so,sapftp,sapgui,saphttp} "${RPM_BUILD_ROOT}%{_platinguipath}/bin"/
install bin/gmux/* "${RPM_BUILD_ROOT}%{_platinguipath}/bin/gmux"/
install jar/* "${RPM_BUILD_ROOT}%{_platinguipath}/jar"/
install inst/hicolor/128x128/apps/* "${RPM_BUILD_ROOT}%{_platinguipath}/inst/hicolor/128x128/apps"/
install inst/hicolor/16x16/apps/* "${RPM_BUILD_ROOT}%{_platinguipath}/inst/hicolor/16x16/apps"/
install inst/hicolor/22x22/apps/* "${RPM_BUILD_ROOT}%{_platinguipath}/inst/hicolor/22x22/apps"/
install inst/hicolor/32x32/apps/* "${RPM_BUILD_ROOT}%{_platinguipath}/inst/hicolor/32x32/apps"/
install inst/hicolor/48x48/apps/* "${RPM_BUILD_ROOT}%{_platinguipath}/inst/hicolor/48x48/apps"/
install inst/hicolor/64x64/apps/* "${RPM_BUILD_ROOT}%{_platinguipath}/inst/hicolor/64x64/apps"/
install security/* "${RPM_BUILD_ROOT}%{_platinguipath}/security"/
install doc/*.htm "${RPM_BUILD_ROOT}%{_platinguipath}/doc"/
install doc/admconf/* "${RPM_BUILD_ROOT}%{_platinguipath}/doc/admconf"/
install doc/applet/* "${RPM_BUILD_ROOT}%{_platinguipath}/doc/applet"/
install doc/backgrnd/* "${RPM_BUILD_ROOT}%{_platinguipath}/doc/backgrnd"/
install doc/install/* "${RPM_BUILD_ROOT}%{_platinguipath}/doc/install"/
install doc/intro/* "${RPM_BUILD_ROOT}%{_platinguipath}/doc/intro"/
install doc/license/* "${RPM_BUILD_ROOT}%{_platinguipath}/doc/license"/
install doc/relnotes/* "${RPM_BUILD_ROOT}%{_platinguipath}/doc/relnotes"/
install doc/start/* "${RPM_BUILD_ROOT}%{_platinguipath}/doc/start"/
install doc/sysreq/* "${RPM_BUILD_ROOT}%{_platinguipath}/doc/sysreq"/
install doc/userconf/* "${RPM_BUILD_ROOT}%{_platinguipath}/doc/userconf"/
install doc/webdynpro/* "${RPM_BUILD_ROOT}%{_platinguipath}/doc/webdynpro"/
install *.desktop "${RPM_BUILD_ROOT}/usr/share/applications"/
%clean
[ "${RPM_BUILD_ROOT}" != "/" ] && [ -d "${RPM_BUILD_ROOT}" ] && \
rm -rf "${RPM_BUILD_ROOT}"
%files
%defattr(644, root, root, 755)
%{_platinguipath}/install.*
%attr(0755,root,root) %{_platinguipath}/bin/*
%{_platinguipath}/inst/*
%{_platinguipath}/jar/*
%{_platinguipath}/security/*
%{_platinguipath}/doc/*
/usr/share/applications/*.desktop
#/usr/lib/debug/opt/SAPGUI/bin/*
#/usr/lib/debug/opt/SAPGUI/bin/gmux/*
%changelog
* Thu Feb 26 2008 Lewi Supranata .K
- add shortcut to /usr/share/applications for OpenSUSE
* Thu Feb 21 2008 Lewi Supranata .K
- Version PlatinGUI-710r1
- First build
----
5. run rpmbuild
# rpmbuild -ba SAPGUI.spec
6. done and put just newly created /usr/src/packages/RPMS/noarch/SAPGUI-Linux-7.10rev2.2.noarch.rpm to your repository server dir
7. createrepo /home/repo/SAPGUI
(recreate repo data in directory SAPGUI)
8. zypper in SAPGUI
(for install new SAPGUI packages)
enjoy your easy and fast installation SAPGUI for linux
No comments:
Post a Comment