PageRenderTime 47ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/install/rpm/SPECS/yabs1.spec

http://mp-rechnungs-und-kundenverwaltung.googlecode.com/
Unknown | 97 lines | 78 code | 19 blank | 0 comment | 0 complexity | db418feaf7e1c517a7c531590013672a MD5 | raw file
Possible License(s): LGPL-3.0, Apache-2.0, GPL-3.0, GPL-2.0, AGPL-3.0, JSON, BSD-3-Clause
  1. Summary: YaBS Version 1
  2. Name: yabs
  3. Version: 1.0
  4. Release: 3
  5. License: GPL
  6. Group: Applications/Office
  7. BuildRoot: %{_builddir}/%{name}-root
  8. URL: http://openyabs.org
  9. Vendor: anti43
  10. Packager: Andreas Weber
  11. Prefix: %{install_dir}
  12. BuildArchitectures: noarch
  13. Requires: java >= 1.6
  14. %define my_dir /home/anti/NetBeansProjects/trunk
  15. %define install_dir /usr/local
  16. %define Version 1
  17. %define Release 0
  18. %description
  19. YaBS Crossplatform Billing and Accounting Application
  20. %prep
  21. %build
  22. cd %{my_dir}/dist/
  23. rm -rf README.TXT
  24. tar -cf %{_builddir}/yabs%{Version}.%{Release}.tar *
  25. %install
  26. pwd
  27. rm -rf $RPM_BUILD_ROOT
  28. rm -rf $RPM_BUILD_ROOT%{install_dir}/yabs/yabs%{Version}
  29. mkdir -p $RPM_BUILD_ROOT%{install_dir}/yabs/yabs%{Version}
  30. cd $RPM_BUILD_ROOT%{install_dir}/yabs/yabs%{Version}
  31. tar -xf $RPM_BUILD_ROOT/../yabs%{Version}.%{Release}.tar
  32. # Create menu entry
  33. mkdir -p $RPM_BUILD_ROOT%{install_dir}/yabs/yabs%{Version}/misc
  34. cat > $RPM_BUILD_ROOT%{install_dir}/yabs/yabs%{Version}/misc/yabs%{Version}.desktop <<EOF
  35. [Desktop Entry]
  36. Name=YaBS 1.0
  37. Comment=Crossplatform Accounting and Billing Application
  38. Exec=java -jar %{install_dir}/yabs/yabs%{Version}/yabs.jar
  39. Icon=%{install_dir}/yabs/yabs%{Version}/misc/yabsd.png
  40. Terminal=False
  41. StartupNotify=false
  42. Categories=Office;X-SuSE-Core-Office
  43. Encoding=UTF-8
  44. Type=Application
  45. EOF
  46. # Create run script
  47. cat > $RPM_BUILD_ROOT%{install_dir}/yabs/yabs%{Version}/misc/yabs%{Version}.sh <<EOF
  48. #!/bin/bash
  49. java -jar %{install_dir}/yabs/yabs%{Version}/yabs.jar $1 $2 $3 $4 $5
  50. EOF
  51. chmod 644 $RPM_BUILD_ROOT%{install_dir}/yabs/yabs%{Version}/misc/yabs%{Version}.desktop
  52. cp -f $RPM_BUILD_ROOT%{install_dir}/yabs/yabs%{Version}/misc/yabs%{Version}.desktop /usr/share/applications/yabs%{Version}.desktop
  53. cp -f %{my_dir}/install/yabsd.png $RPM_BUILD_ROOT%{install_dir}/yabs/yabs%{Version}/misc/yabsd.png
  54. %post
  55. ln -fs %{install_dir}/yabs/yabs%{Version}/misc/yabs%{Version}.sh /usr/bin/yabs
  56. %preun
  57. unlink /usr/bin/yabs
  58. %postun
  59. rm -f /usr/share/applications/yabs%{Version}.desktop
  60. %clean
  61. rm -rf $RPM_BUILD_ROOT
  62. rm -rf %{_builddir}/yabs%{Version}.%{Release}.tar *
  63. %files
  64. %defattr(755,root,root)
  65. %{install_dir}/yabs/yabs%{Version}/yabs.jar
  66. %{install_dir}/yabs/yabs%{Version}/lib/*.jar
  67. %{install_dir}/yabs/yabs%{Version}/misc/yabsd.png
  68. %{install_dir}/yabs/yabs%{Version}/misc/yabs%{Version}.desktop
  69. %attr(755,root,root)
  70. %{install_dir}/yabs/yabs%{Version}/misc/yabs%{Version}.sh
  71. %changelog
  72. * Sun Sep 6 2009 Anti43
  73. - Changed names from MP to YaBS
  74. * Sun Jun 21 2009 Anti43
  75. - Added Requires Java >= 1.6
  76. - Added symlink creation of /usr/bin/yabs
  77. * Sun May 03 2009 Anti43
  78. - Created initial spec file