[packages/newmail] - new
atler
atler at pld-linux.org
Wed Oct 3 19:03:32 CEST 2012
commit 40f4ddb74f89ae5ea6af4f49e5563f6d67ba6e54
Author: Jan Palus <jan.palus at gmail.com>
Date: Wed Oct 3 19:03:06 2012 +0200
- new
newmail-compile.patch | 12 ++++++++++++
newmail.spec | 41 +++++++++++++++++++++++++++++++++++++++++
2 files changed, 53 insertions(+)
---
diff --git a/newmail.spec b/newmail.spec
new file mode 100644
index 0000000..029a346
--- /dev/null
+++ b/newmail.spec
@@ -0,0 +1,41 @@
+Summary: Count unread mails in a Maildir++ directory structure
+Name: newmail
+Version: 1.0
+Release: 1
+License: BSD-like
+Group: Applications
+Source0: http://burningsoda.com/software/newmail/%{name}-%{version}.tgz
+# Source0-md5: f2b3f52714646f38d79e128502923596
+Patch0: %{name}-compile.patch
+URL: http://burningsoda.com/software/newmail/
+BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+
+%description
+newmail is a command line utility to check for new/unread mail in a
+recursive Maildir++ folder structure. It is written in pure ANSI C,
+should work on any POSIX compatible system, and can be used for other
+stuff—like, for example, in combination with Mutt—too.
+
+%prep
+%setup -q -n newmail
+%patch0 -p1
+
+%build
+%{__cc} %{rpmcflags} newmail.c -o newmail %{rpmldflags}
+
+%install
+rm -rf $RPM_BUILD_ROOT
+
+install -d $RPM_BUILD_ROOT%{_bindir}/
+install -d $RPM_BUILD_ROOT%{_mandir}/man1
+install newmail $RPM_BUILD_ROOT%{_bindir}
+install newmail.1 $RPM_BUILD_ROOT%{_mandir}/man1
+
+%clean
+rm -rf $RPM_BUILD_ROOT
+
+%files
+%defattr(644,root,root,755)
+%doc LICENSE
+%attr(755,root,root) %{_bindir}/newmail
+%{_mandir}/man1/newmail.1*
diff --git a/newmail-compile.patch b/newmail-compile.patch
new file mode 100644
index 0000000..786e13e
--- /dev/null
+++ b/newmail-compile.patch
@@ -0,0 +1,12 @@
+diff -ur newmail.orig/newmail.c newmail/newmail.c
+--- newmail.orig/newmail.c 2012-10-03 18:53:40.534769342 +0200
++++ newmail/newmail.c 2012-10-03 18:53:56.908013977 +0200
+@@ -126,7 +126,7 @@
+ fprintf(stderr, "%s: Only one directory structure allowed. "
+ "Using: %s\n", argv[0], argv[optind]);
+ }
+- snprintf(maildirname, sizeof(maildirname), argv[optind]);
++ strncpy(maildirname, argv[optind], MAXPATHLEN);
+ } else {
+ if (!getenv("HOME")) error_quit("Unable to determine $HOME directory");
+ snprintf(maildirname, sizeof(maildirname), "%s/Maildir", getenv("HOME"));
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/newmail.git/commitdiff/40f4ddb74f89ae5ea6af4f49e5563f6d67ba6e54
More information about the pld-cvs-commit
mailing list