Package init
This commit is contained in:
parent
7ae5cb0f57
commit
d2f45f4cc3
36
README.en.md
36
README.en.md
@ -1,36 +0,0 @@
|
|||||||
# mutt
|
|
||||||
|
|
||||||
#### Description
|
|
||||||
{**When you're done, you can delete the content in this README and update the file with details for others getting started with your repository**}
|
|
||||||
|
|
||||||
#### Software Architecture
|
|
||||||
Software architecture description
|
|
||||||
|
|
||||||
#### Installation
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Instructions
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### Contribution
|
|
||||||
|
|
||||||
1. Fork the repository
|
|
||||||
2. Create Feat_xxx branch
|
|
||||||
3. Commit your code
|
|
||||||
4. Create Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### Gitee Feature
|
|
||||||
|
|
||||||
1. You can use Readme\_XXX.md to support different languages, such as Readme\_en.md, Readme\_zh.md
|
|
||||||
2. Gitee blog [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. Explore open source project [https://gitee.com/explore](https://gitee.com/explore)
|
|
||||||
4. The most valuable open source project [GVP](https://gitee.com/gvp)
|
|
||||||
5. The manual of Gitee [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. The most popular members [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
39
README.md
39
README.md
@ -1,39 +0,0 @@
|
|||||||
# mutt
|
|
||||||
|
|
||||||
#### 介绍
|
|
||||||
{**以下是码云平台说明,您可以替换此简介**
|
|
||||||
码云是 OSCHINA 推出的基于 Git 的代码托管平台(同时支持 SVN)。专为开发者提供稳定、高效、安全的云端软件开发协作平台
|
|
||||||
无论是个人、团队、或是企业,都能够用码云实现代码托管、项目管理、协作开发。企业项目请看 [https://gitee.com/enterprises](https://gitee.com/enterprises)}
|
|
||||||
|
|
||||||
#### 软件架构
|
|
||||||
软件架构说明
|
|
||||||
|
|
||||||
|
|
||||||
#### 安装教程
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 使用说明
|
|
||||||
|
|
||||||
1. xxxx
|
|
||||||
2. xxxx
|
|
||||||
3. xxxx
|
|
||||||
|
|
||||||
#### 参与贡献
|
|
||||||
|
|
||||||
1. Fork 本仓库
|
|
||||||
2. 新建 Feat_xxx 分支
|
|
||||||
3. 提交代码
|
|
||||||
4. 新建 Pull Request
|
|
||||||
|
|
||||||
|
|
||||||
#### 码云特技
|
|
||||||
|
|
||||||
1. 使用 Readme\_XXX.md 来支持不同的语言,例如 Readme\_en.md, Readme\_zh.md
|
|
||||||
2. 码云官方博客 [blog.gitee.com](https://blog.gitee.com)
|
|
||||||
3. 你可以 [https://gitee.com/explore](https://gitee.com/explore) 这个地址来了解码云上的优秀开源项目
|
|
||||||
4. [GVP](https://gitee.com/gvp) 全称是码云最有价值开源项目,是码云综合评定出的优秀开源项目
|
|
||||||
5. 码云官方提供的使用手册 [https://gitee.com/help](https://gitee.com/help)
|
|
||||||
6. 码云封面人物是一档用来展示码云会员风采的栏目 [https://gitee.com/gitee-stars/](https://gitee.com/gitee-stars/)
|
|
||||||
20
mutt-1.10.0-muttrc.patch
Normal file
20
mutt-1.10.0-muttrc.patch
Normal file
@ -0,0 +1,20 @@
|
|||||||
|
diff -ur mutt-1.8.0.orig/doc/Muttrc.head mutt-1.8.0/doc/Muttrc.head
|
||||||
|
--- mutt-1.8.0.orig/doc/Muttrc.head 2017-02-25 15:28:22.120997474 +0000
|
||||||
|
+++ mutt-1.8.0/doc/Muttrc.head 2017-02-25 15:30:10.643079681 +0000
|
||||||
|
@@ -24,12 +24,16 @@
|
||||||
|
|
||||||
|
# Show documentation when pressing F1
|
||||||
|
macro generic,pager <F1> "<shell-escape> less @docdir@/manual.txt<Enter>" "show Mutt documentation"
|
||||||
|
+# and also F2, as some terminals use F1
|
||||||
|
+macro generic,pager <F2> "<shell-escape> less @docdir@/manual.txt<Enter>" "show Mutt documentation"
|
||||||
|
|
||||||
|
# show the incoming mailboxes list (just like "mutt -y") and back when pressing "y"
|
||||||
|
macro index y "<change-folder>?<toggle-mailboxes>" "show incoming mailboxes list"
|
||||||
|
macro pager y "<exit><change-folder>?<toggle-mailboxes>" "show incoming mailboxes list"
|
||||||
|
bind browser y exit
|
||||||
|
|
||||||
|
+bind editor <delete> delete-char
|
||||||
|
+
|
||||||
|
# Handler for gzip compressed mailboxes
|
||||||
|
# open-hook '\.gz$' "gzip -cd '%f' > '%t'"
|
||||||
|
# close-hook '\.gz$' "gzip -c '%t' > '%f'"
|
||||||
BIN
mutt-1.10.1.tar.gz
Normal file
BIN
mutt-1.10.1.tar.gz
Normal file
Binary file not shown.
12
mutt-1.5.23-system_certs.patch
Normal file
12
mutt-1.5.23-system_certs.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -rup mutt-17a4f92e4a95-orig/init.h mutt-17a4f92e4a95-new/init.h
|
||||||
|
--- mutt-17a4f92e4a95-orig/init.h 2015-06-07 22:59:32.000000000 +0200
|
||||||
|
+++ mutt-17a4f92e4a95-new/init.h 2015-06-25 15:28:56.095570332 +0200
|
||||||
|
@@ -2989,7 +2989,7 @@ struct option_t MuttVars[] = {
|
||||||
|
*/
|
||||||
|
#if defined(USE_SSL)
|
||||||
|
#ifdef USE_SSL_GNUTLS
|
||||||
|
- { "ssl_ca_certificates_file", DT_PATH, R_NONE, UL &SslCACertFile, 0 },
|
||||||
|
+ { "ssl_ca_certificates_file", DT_PATH, R_NONE, UL &SslCACertFile, "/etc/ssl/certs/ca-bundle.crt" },
|
||||||
|
/*
|
||||||
|
** .pp
|
||||||
|
** This variable specifies a file containing trusted CA certificates.
|
||||||
12
mutt-1.7.0-syncdebug.patch
Normal file
12
mutt-1.7.0-syncdebug.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -ur mutt-1.7.0-orig/imap/imap.c mutt-1.7.0/imap/imap.c
|
||||||
|
--- mutt-1.7.0-orig/imap/imap.c 2016-08-20 11:06:26.266272415 +0100
|
||||||
|
+++ mutt-1.7.0/imap/imap.c 2016-08-20 11:07:42.874509429 +0100
|
||||||
|
@@ -1143,7 +1143,7 @@
|
||||||
|
if (!idata->ctx)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
- if (!mutt_bit_isset (idata->ctx->rights, right))
|
||||||
|
+ if (!idata->ctx || !mutt_bit_isset (idata->ctx->rights, right))
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
if (right == MUTT_ACL_WRITE && !imap_has_flag (idata->flags, name))
|
||||||
28
mutt-1.8.0-cabundle.patch
Normal file
28
mutt-1.8.0-cabundle.patch
Normal file
@ -0,0 +1,28 @@
|
|||||||
|
diff -ur mutt-1.8.0.orig/contrib/Makefile.am mutt-1.8.0/contrib/Makefile.am
|
||||||
|
--- mutt-1.8.0.orig/contrib/Makefile.am 2017-02-25 15:28:22.124997366 +0000
|
||||||
|
+++ mutt-1.8.0/contrib/Makefile.am 2017-02-25 15:48:10.834036861 +0000
|
||||||
|
@@ -5,7 +5,7 @@
|
||||||
|
SAMPLES = Mush.rc Pine.rc gpg.rc pgp2.rc pgp5.rc pgp6.rc Tin.rc \
|
||||||
|
sample.mailcap sample.muttrc sample.muttrc-sidebar sample.muttrc-tlr \
|
||||||
|
sample.muttrc-compress sample.vimrc-sidebar colors.default colors.linux smime.rc \
|
||||||
|
- ca-bundle.crt smime_keys_test.pl mutt_xtitle
|
||||||
|
+ smime_keys_test.pl mutt_xtitle
|
||||||
|
|
||||||
|
EXTRA_DIST = language.txt language50.txt \
|
||||||
|
patch.slang-1.2.2.keypad.1 \
|
||||||
|
diff -ur mutt-1.8.0.orig/doc/smime-notes.txt mutt-1.8.0/doc/smime-notes.txt
|
||||||
|
--- mutt-1.8.0.orig/doc/smime-notes.txt 2017-02-25 15:28:22.119997501 +0000
|
||||||
|
+++ mutt-1.8.0/doc/smime-notes.txt 2017-02-25 16:06:38.986242390 +0000
|
||||||
|
@@ -40,8 +40,10 @@
|
||||||
|
- Edit the smime_sign_as line in your muttrc, replacing the keyid with your
|
||||||
|
own.
|
||||||
|
|
||||||
|
-- You probably want to import the trusted roots in
|
||||||
|
- contrib/ca-bundle.crt. This makes you trust anything that was ultimately
|
||||||
|
+- There is no more ca-bundle.crt file with the trusted roots to import shipped
|
||||||
|
+ in mutt. The upstream file is out-dated and user is encouraged to use
|
||||||
|
+ ca-bundle.crt from ca-certificate package.
|
||||||
|
+ This makes you trust anything that was ultimately
|
||||||
|
signed by one of them. You can use "smime_keys add_root" to do so, or
|
||||||
|
just copy ca-bundle.crt into the place you point mutt's smime_ca_location
|
||||||
|
variable to.
|
||||||
32
mutt-1.9.0-ssl_ciphers.patch
Normal file
32
mutt-1.9.0-ssl_ciphers.patch
Normal file
@ -0,0 +1,32 @@
|
|||||||
|
diff -ur mutt-1.9.0.orig/init.h mutt-1.9.0/init.h
|
||||||
|
--- mutt-1.9.0.orig/init.h 2017-09-04 16:48:21.409528002 +0200
|
||||||
|
+++ mutt-1.9.0/init.h 2017-09-04 16:49:26.505093636 +0200
|
||||||
|
@@ -3510,7 +3510,7 @@
|
||||||
|
*/
|
||||||
|
# endif /* defined HAVE_SSL_PARTIAL_CHAIN */
|
||||||
|
# endif /* defined USE_SSL_OPENSSL */
|
||||||
|
- { "ssl_ciphers", DT_STR, R_NONE, UL &SslCiphers, UL 0 },
|
||||||
|
+ { "ssl_ciphers", DT_STR, R_NONE, UL &SslCiphers, UL "@SYSTEM" },
|
||||||
|
/*
|
||||||
|
** .pp
|
||||||
|
** Contains a colon-seperated list of ciphers to use when using SSL.
|
||||||
|
diff -ur mutt-1.9.0.orig/mutt_ssl_gnutls.c mutt-1.9.0/mutt_ssl_gnutls.c
|
||||||
|
--- mutt-1.9.0.orig/mutt_ssl_gnutls.c 2017-09-04 16:48:21.403528134 +0200
|
||||||
|
+++ mutt-1.9.0/mutt_ssl_gnutls.c 2017-09-04 16:51:16.081679141 +0200
|
||||||
|
@@ -286,6 +286,8 @@
|
||||||
|
else
|
||||||
|
safe_strcat (priority, priority_size, "NORMAL");
|
||||||
|
|
||||||
|
+if (SslCiphers && strcmp(SslCiphers, "@SYSTEM"))
|
||||||
|
+{
|
||||||
|
if (! option(OPTTLSV1_2))
|
||||||
|
{
|
||||||
|
nproto--;
|
||||||
|
@@ -313,6 +315,7 @@
|
||||||
|
FREE (&priority);
|
||||||
|
return -1;
|
||||||
|
}
|
||||||
|
+}
|
||||||
|
|
||||||
|
if ((err = gnutls_priority_set_direct (data->state, priority, NULL)) < 0)
|
||||||
|
{
|
||||||
12
mutt-1.9.4-lynx_no_backscapes.patch
Normal file
12
mutt-1.9.4-lynx_no_backscapes.patch
Normal file
@ -0,0 +1,12 @@
|
|||||||
|
diff -up mutt-1.9.1/doc/Makefile.am.lynx_no_backscapes mutt-1.9.1/doc/Makefile.am
|
||||||
|
--- mutt-1.9.1/doc/Makefile.am.lynx_no_backscapes 2018-04-12 15:30:14.881812698 +0200
|
||||||
|
+++ mutt-1.9.1/doc/Makefile.am 2018-04-12 15:30:25.632968018 +0200
|
||||||
|
@@ -109,7 +109,7 @@ uninstall-local:
|
||||||
|
|
||||||
|
check:
|
||||||
|
manual.txt: manual.html
|
||||||
|
- -LC_ALL=C lynx -dump -nolist -with_backspaces -display_charset=us-ascii manual.html > $@ || \
|
||||||
|
+ -LC_ALL=C lynx -dump -nolist -display_charset=us-ascii manual.html > $@ || \
|
||||||
|
LC_ALL=C w3m -dump manual.html > $@ || \
|
||||||
|
LC_ALL=C elinks -dump -no-numbering -no-references manual.html | sed -e 's,\\001, ,g' > $@
|
||||||
|
|
||||||
43
mutt-1.9.5-nodotlock.patch
Normal file
43
mutt-1.9.5-nodotlock.patch
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
diff -up mutt-1.10.0/configure.ac.nodotlock mutt-1.10.0/configure.ac
|
||||||
|
--- mutt-1.10.0/configure.ac.nodotlock 2018-05-14 23:51:53.000000000 +0200
|
||||||
|
+++ mutt-1.10.0/configure.ac 2018-05-23 15:09:21.186613968 +0200
|
||||||
|
@@ -528,9 +528,7 @@ int main (int argc, char **argv)
|
||||||
|
}]])],[mutt_cv_worldwrite=yes],[mutt_cv_worldwrite=no],[mutt_cv_worldwrite=no])])
|
||||||
|
|
||||||
|
mutt_cv_setgid=no
|
||||||
|
- if test $mutt_cv_worldwrite = yes; then
|
||||||
|
- AC_DEFINE(USE_DOTLOCK,1,[ Define to use dotlocking for mailboxes. ])
|
||||||
|
- else
|
||||||
|
+ if test $mutt_cv_worldwrite != yes; then
|
||||||
|
|
||||||
|
AC_CACHE_CHECK(if $mutt_cv_mailpath is group writable, mutt_cv_groupwrite, [AC_RUN_IFELSE([AC_LANG_SOURCE([[#include <sys/types.h>
|
||||||
|
#include <sys/stat.h>
|
||||||
|
@@ -546,7 +544,6 @@ int main (int argc, char **argv)
|
||||||
|
}]])],[mutt_cv_groupwrite=yes],[mutt_cv_groupwrite=no],[mutt_cv_groupwrite=no])])
|
||||||
|
|
||||||
|
if test $mutt_cv_groupwrite = yes; then
|
||||||
|
- AC_DEFINE(USE_DOTLOCK,1,[ Define to use dotlocking for mailboxes. ])
|
||||||
|
AC_DEFINE(USE_SETGID,1,[ Define if mutt should run setgid "mail". ])
|
||||||
|
mutt_cv_setgid=yes
|
||||||
|
fi
|
||||||
|
diff -up mutt-1.10.0/Makefile.am.nodotlock mutt-1.10.0/Makefile.am
|
||||||
|
--- mutt-1.10.0/Makefile.am.nodotlock 2018-05-23 15:11:05.477977659 +0200
|
||||||
|
+++ mutt-1.10.0/Makefile.am 2018-05-23 15:11:20.252170843 +0200
|
||||||
|
@@ -154,17 +154,6 @@ hcversion.h: $(srcdir)/mutt.h $(srcdir)/
|
||||||
|
patchlist.c: $(srcdir)/PATCHES $(srcdir)/patchlist.sh
|
||||||
|
$(srcdir)/patchlist.sh < $(srcdir)/PATCHES > patchlist.c
|
||||||
|
|
||||||
|
-install-exec-hook:
|
||||||
|
- if test -f $(DESTDIR)$(bindir)/mutt.dotlock && test -f $(DESTDIR)$(bindir)/mutt_dotlock ; then \
|
||||||
|
- rm -f $(DESTDIR)$(bindir)/mutt.dotlock ; \
|
||||||
|
- ln -sf $(DESTDIR)$(bindir)/mutt_dotlock $(DESTDIR)$(bindir)/mutt.dotlock ; \
|
||||||
|
- fi
|
||||||
|
- if test -f $(DESTDIR)$(bindir)/mutt_dotlock && test x$(DOTLOCK_GROUP) != x ; then \
|
||||||
|
- chgrp $(DOTLOCK_GROUP) $(DESTDIR)$(bindir)/mutt_dotlock && \
|
||||||
|
- chmod $(DOTLOCK_PERMISSION) $(DESTDIR)$(bindir)/mutt_dotlock || \
|
||||||
|
- { echo "Can't fix mutt_dotlock's permissions! This is required to lock mailboxes in the mail spool directory." >&2 ; exit 1 ; } \
|
||||||
|
- fi
|
||||||
|
-
|
||||||
|
install-data-local:
|
||||||
|
$(MKDIR_P) $(DESTDIR)$(sysconfdir)
|
||||||
|
$(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir)/mime.types.dist
|
||||||
123
mutt.spec
Normal file
123
mutt.spec
Normal file
@ -0,0 +1,123 @@
|
|||||||
|
Name: mutt
|
||||||
|
Version: 1.10.1
|
||||||
|
Release: 2
|
||||||
|
Epoch: 5
|
||||||
|
Summary: Text-based mail client
|
||||||
|
License: GPLv2+ and Public Domain
|
||||||
|
URL: http://www.mutt.org
|
||||||
|
Source: ftp://ftp.mutt.org/pub/%{name}/%{name}-%{version}.tar.gz
|
||||||
|
Source1: mutt_ldap_query
|
||||||
|
|
||||||
|
Patch10: mutt-1.9.4-lynx_no_backscapes.patch
|
||||||
|
Patch12: mutt-1.9.5-nodotlock.patch
|
||||||
|
Patch1: mutt-1.10.0-muttrc.patch
|
||||||
|
Patch2: mutt-1.8.0-cabundle.patch
|
||||||
|
Patch3: mutt-1.7.0-syncdebug.patch
|
||||||
|
Patch8: mutt-1.5.23-system_certs.patch
|
||||||
|
Patch9: mutt-1.9.0-ssl_ciphers.patch
|
||||||
|
|
||||||
|
BuildRequires: gcc ncurses-devel gettext automake /usr/bin/xsltproc
|
||||||
|
BuildRequires: lynx docbook-style-xsl perl-interpreter perl-generators
|
||||||
|
BuildRequires: tokyocabinet-devel gnutls-devel cyrus-sasl-devel
|
||||||
|
BuildRequires: krb5-devel libidn2-devel gpgme-devel
|
||||||
|
Requires: mailcap urlview
|
||||||
|
|
||||||
|
%description
|
||||||
|
Mutt is a small but very powerful text-based mail client for Unix operating systems.
|
||||||
|
|
||||||
|
%package_help
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%autosetup -n %{name}-%{version} -p1
|
||||||
|
|
||||||
|
autoreconf --install
|
||||||
|
|
||||||
|
sed -i -r 's/`$GPGME_CONFIG --libs`/"\0 -lgpg-error"/' configure
|
||||||
|
|
||||||
|
install -p -m644 %{SOURCE1} mutt_ldap_query
|
||||||
|
|
||||||
|
if echo %{release} | grep -E -q '\\.(201[0-9])([0-1][0-9])([0-3][0-9])hg\\.(201[0-9])([0-1][0-9])([0-3][0-9])hg'; then
|
||||||
|
echo -n 'const char *ReleaseDate = ' > reldate.h
|
||||||
|
echo %{release} | sed -r 's/.*\\.(201[0-9])([0-1][0-9])([0-3][0-9])hg.*/"\1-\2-\3";/' >> reldate.h
|
||||||
|
fi
|
||||||
|
|
||||||
|
rm -f mutt_ssl.c
|
||||||
|
|
||||||
|
%build
|
||||||
|
%configure \
|
||||||
|
SENDMAIL=%{_sbindir}/sendmail \
|
||||||
|
ISPELL=%{_bindir}/hunspell \
|
||||||
|
--enable-debug \
|
||||||
|
--enable-pop \
|
||||||
|
--enable-imap \
|
||||||
|
--enable-smtp \
|
||||||
|
--enable-hcache \
|
||||||
|
--without-gdbm \
|
||||||
|
--without-qdbm \
|
||||||
|
--with-gnutls \
|
||||||
|
--with-sasl \
|
||||||
|
--with-gss \
|
||||||
|
--without-idn \
|
||||||
|
--with-idn2 \
|
||||||
|
--enable-gpgme \
|
||||||
|
--enable-sidebar \
|
||||||
|
--with-docdir=%{_docdir}/%{name}-%{version}}
|
||||||
|
|
||||||
|
%make_build
|
||||||
|
|
||||||
|
sed -i -r 's/<a id="id[a-z0-9]\+">/<a id="id">/g' doc/manual.html
|
||||||
|
|
||||||
|
%install
|
||||||
|
%make_install
|
||||||
|
|
||||||
|
cat contrib/gpg.rc >> \
|
||||||
|
%{buildroot}%{_sysconfdir}/Muttrc
|
||||||
|
|
||||||
|
grep -5 "^color" contrib/sample.muttrc >> \
|
||||||
|
%{buildroot}%{_sysconfdir}/Muttrc
|
||||||
|
|
||||||
|
cat >> %{buildroot}%{_sysconfdir}/Muttrc <<\EOF
|
||||||
|
source %{_sysconfdir}/Muttrc.local
|
||||||
|
EOF
|
||||||
|
|
||||||
|
echo "# Local configuration for Mutt." > \
|
||||||
|
%{buildroot}%{_sysconfdir}/Muttrc.local
|
||||||
|
|
||||||
|
ln -sf ./muttrc.5 %{buildroot}%{_mandir}/man5/muttrc.local.5
|
||||||
|
|
||||||
|
%find_lang %{name}
|
||||||
|
|
||||||
|
%files -f %{name}.lang
|
||||||
|
%{!?_licensedir:%global license %doc}
|
||||||
|
%license COPYRIGHT GPL
|
||||||
|
%doc ChangeLog NEWS README* UPDATING mutt_ldap_query
|
||||||
|
%doc contrib/*.rc contrib/sample.* contrib/colors.*
|
||||||
|
%doc doc/manual.html doc/manual.txt doc/smime-notes.txt
|
||||||
|
%config(noreplace) %{_sysconfdir}/Muttrc
|
||||||
|
%config(noreplace) %{_sysconfdir}/Muttrc.local
|
||||||
|
%{_bindir}/mutt
|
||||||
|
%{_bindir}/pgpring
|
||||||
|
%{_bindir}/pgpewrap
|
||||||
|
%{_bindir}/smime_keys
|
||||||
|
%exclude %{_sysconfdir}/*.dist
|
||||||
|
%exclude %{_sysconfdir}/mime.types
|
||||||
|
%exclude %{_bindir}/mutt_dotlock
|
||||||
|
%exclude %{_bindir}/muttbug
|
||||||
|
%exclude %{_bindir}/flea
|
||||||
|
%exclude %{_mandir}/man1/mutt_dotlock.1*
|
||||||
|
%exclude %{_mandir}/man1/muttbug.1*
|
||||||
|
%exclude %{_mandir}/man1/flea.1*
|
||||||
|
%exclude %{_mandir}/man5/mbox.5*
|
||||||
|
%exclude %{_mandir}/man5/mmdf.5*
|
||||||
|
%exclude %{_docdir}/%{name}-%{version}}
|
||||||
|
|
||||||
|
%files help
|
||||||
|
%{_mandir}/man1/mutt.*
|
||||||
|
%{_mandir}/man1/smime_keys.*
|
||||||
|
%{_mandir}/man1/pgpring.*
|
||||||
|
%{_mandir}/man1/pgpewrap.*
|
||||||
|
%{_mandir}/man5/muttrc.*
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* Tue Nov 19 2019 openEuler Buildteam <buildteam@openeuler.org> - 1.10.1-2
|
||||||
|
- Package init
|
||||||
42
mutt_ldap_query
Normal file
42
mutt_ldap_query
Normal file
@ -0,0 +1,42 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# Last modified: 30 October 2000
|
||||||
|
#
|
||||||
|
|
||||||
|
FLAGS=
|
||||||
|
|
||||||
|
# Create two temporary files.
|
||||||
|
umask 077
|
||||||
|
TMPFILE=`mktemp /tmp/mutt.ldap.XXXXXX`
|
||||||
|
RESULTS=`mktemp /tmp/mutt.ldap.XXXXXX`
|
||||||
|
|
||||||
|
if [ -n "$LDAPSERVER" ]; then
|
||||||
|
FLAGS="$FLAGS -h $LDAPSERVER"
|
||||||
|
fi
|
||||||
|
if [ -n "$LDAPBASEDN" ]; then
|
||||||
|
FLAGS="$FLAGS -b $LDAPBASEDN"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Search.
|
||||||
|
ldapsearch $FLAGS '(&(objectclass=inetorgperson)(|(cn='"$1"'*)(givenname='"$1"'*)(surname='"$1"'*)(mail='"$1"'*)))' mail cn roomNumber 2> /dev/null >> $TMPFILE
|
||||||
|
ldapsearch -x $FLAGS '(&(objectclass=inetorgperson)(|(cn='"$1"'*)(givenname='"$1"'*)(surname='"$1"'*)(mail='"$1"'*)))' mail cn roomNumber 2> /dev/null >> $TMPFILE
|
||||||
|
|
||||||
|
# Parse.
|
||||||
|
cat $TMPFILE | awk '
|
||||||
|
/^mail:/ {MAIL=substr($0,6)}
|
||||||
|
/^cn:/ {NAME=substr($0,4)}
|
||||||
|
/^roomNumber:/ {ROOM=substr($0,12)}
|
||||||
|
/^$/ { MAIL=gensub("^ *| *$","","g",MAIL) }
|
||||||
|
/^$/ { NAME=gensub("^ *| *$","","g",NAME) }
|
||||||
|
/^$/ { ROOM=gensub("^ *| *$","","g",ROOM) }
|
||||||
|
/^$/ { if(length(NAME) > 0) print MAIL "\t" NAME "\t" ROOM}
|
||||||
|
/^$/ { NAME = "" }
|
||||||
|
' > $RESULTS
|
||||||
|
|
||||||
|
# Sort and present results.
|
||||||
|
sort -u $RESULTS > $TMPFILE
|
||||||
|
echo Querying ${LDAPSERVER}.... `cat $TMPFILE | wc -l` entries found.
|
||||||
|
cat $TMPFILE
|
||||||
|
|
||||||
|
# Clean up.
|
||||||
|
rm -f $TMPFILE $RESULTS
|
||||||
Loading…
x
Reference in New Issue
Block a user