]> git.pld-linux.org Git - packages/galternatives.git/blame - galternatives.spec
use /usr/sbin/update-alternatives path as before
[packages/galternatives.git] / galternatives.spec
CommitLineData
f43ae8ac
ER
1Summary: Alternatives Configurator
2Name: galternatives
e997628e 3Version: 0.13.5
f85cc0bd 4Release: 0.1
f43ae8ac
ER
5License: GPL+
6Group: Applications/System
e997628e
ER
7Source0: http://ftp.debian.org/debian/pool/main/g/galternatives/%{name}_%{version}+nmu4.tar.xz
8# Source0-md5: c1ce820069b9150020a9ba85413044fa
f43ae8ac
ER
9Source1: org.fedoraproject.pkexec.run-%{name}.policy
10Source2: %{name}.pamd
24f54e0d 11Source3: %{name}.sh
f43ae8ac
ER
12Patch0: %{name}-desktop.patch
13Patch1: %{name}-fedora.patch
14URL: http://packages.qa.debian.org/g/galternatives.html
15BuildRequires: desktop-file-utils
dfca2bcc 16BuildRequires: gettext-tools
f43ae8ac 17BuildRequires: intltool
f43ae8ac
ER
18BuildRequires: python-pygtk-glade
19BuildRequires: rpm-pythonprov
20BuildRequires: rpmbuild(macros) >= 1.714
e997628e
ER
21BuildRequires: tar >= 1:1.22
22BuildRequires: xz
f43ae8ac 23Requires: /usr/sbin/update-alternatives
fe6c287b 24Requires: polkit
f43ae8ac
ER
25Requires: python-pygtk-glade
26Requires: python-pygtk-gtk
f43ae8ac
ER
27BuildArch: noarch
28BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
29
30%description
31Graphical setup tool for the alternatives system. A GUI to help the
32system administrator to choose what program should provide a given
33service
34
35%prep
e997628e
ER
36%setup -qc
37mv galternatives .tmp; mv .tmp/* .
38%patch0 -p1
39%patch1 -p1
f43ae8ac
ER
40
41# To silence rpmlint
42sed -i '/^#!\%{_prefix}\/bin\/python/ d' galternatives/*.py
43
44%build
45%py_build
46
47%install
48rm -rf $RPM_BUILD_ROOT
49%py_install
50%py_postclean
51
52desktop-file-install --delete-original \
53 --dir $RPM_BUILD_ROOT%{_desktopdir} \
54 --mode 0644 \
55 galternatives.desktop
56
57# polkit/pkexec wrapper
58install -d $RPM_BUILD_ROOT%{_sbindir}
59mv $RPM_BUILD_ROOT%{_bindir}/galternatives $RPM_BUILD_ROOT%{_sbindir}
24f54e0d 60install -p %{SOURCE3} $RPM_BUILD_ROOT%{_bindir}/galternatives
f43ae8ac
ER
61
62# polkit policy
63install -d $RPM_BUILD_ROOT%{_datadir}/polkit-1/actions
64cp -a %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/polkit-1/actions
65
66install -d $RPM_BUILD_ROOT/etc/pam.d
67cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/pam.d/galternatives
68
69cd translations
70LANGS=$(find -name '*.po' | cut -d '.' -f 2 | tr -d '/')
71for 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
75done
76cd -
77
78%find_lang %{name}
79
80%clean
81rm -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
This page took 0.074448 seconds and 4 git commands to generate.