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