]>
Commit | Line | Data |
---|---|---|
f43ae8ac ER |
1 | Summary: Alternatives Configurator |
2 | Name: galternatives | |
3 | Version: 0.13.4 | |
1a1981ae | 4 | Release: 1 |
f43ae8ac ER |
5 | License: GPL+ |
6 | Group: Applications/System | |
7 | #Source0: http://ftp.debian.org/debian/pool/main/g/galternatives/%{name}_%{version}.tar.gz | |
8 | Source0: http://pkgs.fedoraproject.org/repo/pkgs/galternatives/%{name}_%{version}.tar.gz/6148901a78623e85e3265a63588a2d23/galternatives_%{version}.tar.gz | |
9 | # Source0-md5: 6148901a78623e85e3265a63588a2d23 | |
10 | Source1: org.fedoraproject.pkexec.run-%{name}.policy | |
11 | Source2: %{name}.pamd | |
24f54e0d | 12 | Source3: %{name}.sh |
f43ae8ac ER |
13 | Patch0: %{name}-desktop.patch |
14 | Patch1: %{name}-fedora.patch | |
15 | URL: http://packages.qa.debian.org/g/galternatives.html | |
16 | BuildRequires: desktop-file-utils | |
dfca2bcc | 17 | BuildRequires: gettext-tools |
f43ae8ac | 18 | BuildRequires: intltool |
f43ae8ac ER |
19 | BuildRequires: python-pygtk-glade |
20 | BuildRequires: rpm-pythonprov | |
21 | BuildRequires: rpmbuild(macros) >= 1.714 | |
22 | Requires: /usr/sbin/update-alternatives | |
23 | Requires: python-pygtk-glade | |
24 | Requires: python-pygtk-gtk | |
f43ae8ac ER |
25 | BuildArch: noarch |
26 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
27 | ||
28 | %description | |
29 | Graphical setup tool for the alternatives system. A GUI to help the | |
30 | system administrator to choose what program should provide a given | |
31 | service | |
32 | ||
33 | %prep | |
34 | %setup -q | |
35 | %patch0 -p0 | |
36 | %patch1 -p0 | |
37 | ||
38 | # To silence rpmlint | |
39 | sed -i '/^#!\%{_prefix}\/bin\/python/ d' galternatives/*.py | |
40 | ||
41 | %build | |
42 | %py_build | |
43 | ||
44 | %install | |
45 | rm -rf $RPM_BUILD_ROOT | |
46 | %py_install | |
47 | %py_postclean | |
48 | ||
49 | desktop-file-install --delete-original \ | |
50 | --dir $RPM_BUILD_ROOT%{_desktopdir} \ | |
51 | --mode 0644 \ | |
52 | galternatives.desktop | |
53 | ||
54 | # polkit/pkexec wrapper | |
55 | install -d $RPM_BUILD_ROOT%{_sbindir} | |
56 | mv $RPM_BUILD_ROOT%{_bindir}/galternatives $RPM_BUILD_ROOT%{_sbindir} | |
24f54e0d | 57 | install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/galternatives |
f43ae8ac ER |
58 | |
59 | # polkit policy | |
60 | install -d $RPM_BUILD_ROOT%{_datadir}/polkit-1/actions | |
61 | cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/polkit-1/actions | |
62 | ||
63 | install -d $RPM_BUILD_ROOT/etc/pam.d | |
64 | cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/galternatives | |
65 | ||
66 | cd translations | |
67 | LANGS=$(find -name '*.po' | cut -d '.' -f 2 | tr -d '/') | |
68 | for lang in ${LANGS}; do | |
69 | echo ${lang}: | |
70 | install -d $RPM_BUILD_ROOT%{_localedir}/${lang}/LC_MESSAGES | |
71 | cp -p ${lang}.mo $RPM_BUILD_ROOT%{_localedir}/${lang}/LC_MESSAGES/galternatives.mo | |
72 | done | |
73 | cd - | |
74 | ||
75 | %find_lang %{name} | |
76 | ||
77 | %clean | |
78 | rm -rf $RPM_BUILD_ROOT | |
79 | ||
80 | %files -f %{name}.lang | |
81 | %defattr(644,root,root,755) | |
82 | %doc debian/copyright | |
83 | %doc TODO debian/changelog | |
84 | %config(noreplace) %verify(not md5 mtime size) /etc/pam.d/galternatives | |
85 | %attr(755,root,root) %{_bindir}/galternatives | |
86 | %attr(755,root,root) %{_sbindir}/galternatives | |
87 | %{_datadir}/polkit-1/actions/org.fedoraproject.pkexec.run-galternatives.policy | |
88 | %{_datadir}/galternatives | |
89 | %{py_sitescriptdir}/galternatives | |
90 | %{py_sitescriptdir}/galternatives*.egg-info | |
91 | %{_desktopdir}/galternatives.desktop | |
92 | %{_pixmapsdir}/galternatives.png |