1 | #
|
---|
2 | # This file and all modifications and additions to the pristine
|
---|
3 | # package are under the same license as the package itself.
|
---|
4 | #
|
---|
5 | # norootforbuild
|
---|
6 |
|
---|
7 | Name: dassmodus
|
---|
8 | Version: 0.4
|
---|
9 | Release: 1
|
---|
10 | Summary: Python Package to edit Bacula Configuration Files
|
---|
11 | License: Your Package License
|
---|
12 | Group: Development/Libraries/Python
|
---|
13 | Source: %{name}-%{version}.tar.bz2
|
---|
14 | Source1: dassModus.desktop
|
---|
15 | BuildRequires: python-devel
|
---|
16 | BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
---|
17 |
|
---|
18 | %define python_site %{_prefix}/%{_lib}/python%{py_ver}/site-packages
|
---|
19 |
|
---|
20 | %if 0%{?suse_version} && 0%{?suse_version} > 1110
|
---|
21 | BuildArch: noarch
|
---|
22 | %endif
|
---|
23 |
|
---|
24 | # py_requires is no longer needed since 11.3
|
---|
25 | %if 0%{?suse_version}
|
---|
26 | %{py_requires}
|
---|
27 | %endif
|
---|
28 |
|
---|
29 | %if 0%{?suse_version}
|
---|
30 | BuildRequires: update-desktop-files
|
---|
31 | %endif
|
---|
32 |
|
---|
33 | Requires: python-qt4
|
---|
34 | Requires: python-nosferatu
|
---|
35 |
|
---|
36 | %description
|
---|
37 | dassModus is the frontend for editing bacula configuration files.
|
---|
38 | More Info on http://www.dassmodus.org
|
---|
39 |
|
---|
40 | %prep
|
---|
41 | %setup -q
|
---|
42 |
|
---|
43 |
|
---|
44 | %build
|
---|
45 | %{__python} setup.py build
|
---|
46 |
|
---|
47 |
|
---|
48 | %install
|
---|
49 | %if 0%{?suse_version}
|
---|
50 | %{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} --record-rpm=INSTALLED_FILES
|
---|
51 | %else
|
---|
52 | %{__python} setup.py install --prefix=%{_prefix} --root=%{buildroot} --record=INSTALLED_FILES
|
---|
53 | %endif
|
---|
54 |
|
---|
55 | mkdir -p ${RPM_BUILD_ROOT}/usr/bin
|
---|
56 | # create start script
|
---|
57 | echo "#!/bin/sh
|
---|
58 | exec \"/usr/bin/dassModus.py\" \"$@\"
|
---|
59 | " > ${RPM_BUILD_ROOT}/usr/bin/dassModus
|
---|
60 | chmod +x ${RPM_BUILD_ROOT}/usr/bin/dassModus
|
---|
61 |
|
---|
62 | # install icon
|
---|
63 | mkdir -p ${RPM_BUILD_ROOT}/usr/share/pixmaps/
|
---|
64 | cp dassmodus/icons/DassModusLogo/logo64.png ${RPM_BUILD_ROOT}/usr/share/pixmaps/dassModus.png
|
---|
65 |
|
---|
66 | # desktop file
|
---|
67 | %if 0%{?suse_version}
|
---|
68 | %suse_update_desktop_file -i -r -n dassModus System Backup
|
---|
69 | %else
|
---|
70 | mkdir -p ${RPM_BUILD_ROOT}/usr/share/applications/
|
---|
71 | cp %{SOURCE1} ${RPM_BUILD_ROOT}/usr/share/applications/
|
---|
72 | %endif
|
---|
73 |
|
---|
74 | %files -f INSTALLED_FILES
|
---|
75 | %defattr(-,root,root)
|
---|
76 | /usr/bin/dassModus
|
---|
77 | /usr/share/pixmaps/dassModus.png
|
---|
78 | /usr/share/applications/dassModus.desktop
|
---|
79 |
|
---|
80 | %changelog
|
---|