source: dassmodus/trunk/dassmodus/packaging/dassmodus.spec@ 973

Last change on this file since 973 was 973, checked in by pstorz, on Oct 21, 2011 at 1:45:07 PM

changed package name to dassmodus

File size: 2.0 KB
Line 
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
7Name: dassmodus
8Version: 0.4
9Release: 1
10Summary: Python Package to edit Bacula Configuration Files
11License: Your Package License
12Group: Development/Libraries/Python
13Source: %{name}-%{version}.tar.bz2
14Source1: dassModus.desktop
15BuildRequires: python-devel
16BuildRoot: %{_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
21BuildArch: 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}
30BuildRequires: update-desktop-files
31%endif
32
33Requires: python-qt4
34Requires: python-nosferatu
35
36%description
37dassModus is the frontend for editing bacula configuration files.
38More 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
55mkdir -p ${RPM_BUILD_ROOT}/usr/bin
56# create start script
57echo "#!/bin/sh
58exec \"/usr/bin/dassModus.py\" \"$@\"
59" > ${RPM_BUILD_ROOT}/usr/bin/dassModus
60chmod +x ${RPM_BUILD_ROOT}/usr/bin/dassModus
61
62# install icon
63mkdir -p ${RPM_BUILD_ROOT}/usr/share/pixmaps/
64cp 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
70mkdir -p ${RPM_BUILD_ROOT}/usr/share/applications/
71cp %{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
Note: See TracBrowser for help on using the repository browser.