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