]> git.pld-linux.org Git - SPECS.git/blob - mutt_ldap_query.spec
SPECS updated Wed 28 Jul 14:48:01 CEST 2021
[SPECS.git] / mutt_ldap_query.spec
1 Summary:        LDAP query script for Mutt
2 Summary(pl.UTF-8):      Skrypt odpytujący LDAP do Mutta
3 Name:           mutt_ldap_query
4 Version:        0.9
5 Release:        2
6 License:        GPL
7 Group:          Applications/Mail
8 Source0:        %{name}.pl
9 #Source0:       ftp://ftp.mutt.org/pub/mutt/contrib/%{name}-3.0.pl.gz
10 BuildRequires:  rpm-perlprov
11 Requires(post,preun):   grep
12 Requires(post,preun):   mutt
13 Requires(preun):        fileutils
14 Requires:       iconv
15 Requires:       mutt
16 Requires:       openldap
17 BuildArch:      noarch
18 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
19
20 %description
21 This is a simple script, which can be used as Mutt external query
22 command. After installing this package you can use Mutt's "Q" command
23 to query LDAP database, or "^T" when Mutt asks you for email address.
24
25 %description -l pl.UTF-8
26 To jest prosty skrypt, który może być używany jako komenda
27 zewnętrznego zapytania. Po zainstalowaniu tego pakietu możesz używać
28 komendy Mutta "Q" do odpytania bazy LDAP lub "^T" kiedy Mutt pyta o
29 adres e-mail.
30
31 %prep
32
33 %install
34 rm -rf $RPM_BUILD_ROOT
35
36 install -d $RPM_BUILD_ROOT%{_bindir}
37 install %{SOURCE0} $RPM_BUILD_ROOT%{_bindir}
38
39 %clean
40 rm -rf $RPM_BUILD_ROOT
41
42 %post
43 umask 022
44 # check if any query_command is already set
45 if ! grep -E -q "^[[:space:]]*set[[:space:]]+query_command" /etc/Muttrc ; then
46         cat >> /etc/Muttrc <<EOF;
47 set query_command="%{_bindir}/mutt_ldap_query.pl \"\`echo '%s'| iconv -f iso-8859-2 -t utf-8\`\" | iconv -f utf8 -t iso-8859-2"
48 EOF
49 fi
50
51 %preun
52 umask 022
53 # check if query command is set to mutt_ldap_query
54 if grep -E -q "^[[:space:]]*set[[:space:]]+query_command.*%{_bindir}/mutt_ldap_query.pl" /etc/Muttrc ; then
55         mv -f /etc/Muttrc /etc/Muttrc.bak && \
56         grep -E -v "^[[:space:]]*set[[:space:]]+query_command.*%{_bindir}/mutt_ldap_query.pl" \
57                 /etc/Muttrc.bak > /etc/Muttrc
58 fi
59
60 %files
61 %defattr(644,root,root,755)
62 %attr(755,root,root) %{_bindir}/*
This page took 0.578991 seconds and 3 git commands to generate.