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