Skip to content

Commit 01ba6a7

Browse files
committed
Add spec file for building in RPM-based systems.
Spec file creates the following packages: * mu: The main email indexer, with mu4e included for emacs * mu-gtk: with the mug executable * mu-guile: with the bindings for guile As per the Fedora Packaging Guidelines, there should not be a separate emacs-mu package if the main package (mu) does not require emacs, but it provides additional files for its use with emacs. I think that's the point of mu4e.
1 parent 975bed2 commit 01ba6a7

File tree

1 file changed

+129
-0
lines changed

1 file changed

+129
-0
lines changed

contrib/mu.spec

Lines changed: 129 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,129 @@
1+
2+
# These refer to the release version
3+
# When 0.9.9.6 gets out, remove the global pre line
4+
%global pre pre2
5+
%global rel 1
6+
7+
Summary: A lightweight email search engine for Maildirs
8+
Name: mu
9+
Version: 0.9.9.6
10+
URL: https://github.com/djcb/mu
11+
# From Packaging:NamingGuidelines for pre-relase versions:
12+
# Release: 0.%{X}.%{alphatag} where %{X} is the release number
13+
%if %{pre}
14+
Release: 0.%{rel}.%{prerelease}%{?dist}
15+
%else
16+
Release: %{rel}%{?dist}
17+
%endif
18+
19+
License: GPLv3
20+
Group: Applications/Internet
21+
BuildRoot: %{_tmppath}/%{name}-%{version}-build
22+
23+
# Source is at ssaavedra repo because djcb has not yet this version tag created
24+
Source0: http://github.com/ssaavedra/%{name}/archive/v%{version}%{?pre}.tar.gz
25+
BuildRequires: emacs-el
26+
BuildRequires: emacs
27+
BuildRequires: gmime-devel
28+
BuildRequires: guile-devel
29+
BuildRequires: xapian-core-devel
30+
BuildRequires: libuuid-devel
31+
BuildRequires: texinfo
32+
Requires: gmime
33+
Requires: guile
34+
Requires: xapian-core-libs
35+
Requires: emacs-filesystem >= %{_emacs_version}
36+
37+
38+
%description
39+
E-mail is the 'flow' in the work flow of many people. Consequently, one spends a lot of time searching for old e-mails, to dig up some important piece of information. With people having tens of thousands of e-mails (or more), this is becoming harder and harder. How to find that one e-mail in an ever-growing haystack?
40+
Enter mu.
41+
'mu' is a set of command-line tools for Linux/Unix that enable you to quickly find the e-mails you are looking for, assuming that you store your e-mails in Maildirs (if you don't know what 'Maildirs' are, you are probably not using them).
42+
43+
%package gtk
44+
Group: Applications/Internet
45+
Summary: GUI for using mu (called mug)
46+
BuildRequires: gtk3-devel
47+
BuildRequires: webkitgtk3-devel
48+
Requires: gtk3
49+
Requires: gmime
50+
Requires: webkitgtk3
51+
Requires: mu = %{version}-%{release}
52+
53+
%description gtk
54+
Mug is a simple GUI for mu from version 0.9.
55+
56+
%package guile
57+
Group: Applications/Internet
58+
Summary: Guile scripting capabilities for mu
59+
Requires: guile
60+
Requires: mu = %{version}-%{release}
61+
Requires(post): info
62+
Requires(preun): info
63+
64+
%description guile
65+
Bindings for Guile to interact with mu.
66+
67+
68+
%prep
69+
%setup -n %{name}-%{version}%{?pre} -q
70+
71+
%build
72+
autoreconf -i
73+
%configure
74+
make %{?_smp_mflags}
75+
76+
%install
77+
rm -rf %{buildroot}
78+
make install DESTDIR=%{buildroot}
79+
install -p -c -m 755 %{_builddir}/%{buildsubdir}/toys/mug/mug %{buildroot}%{_bindir}/mug
80+
cp -p %{_builddir}/%{buildsubdir}/mu4e/*.el %{buildroot}%{_emacs_sitelispdir}/mu4e/
81+
rm -f %{buildroot}%{_infodir}/dir
82+
83+
%clean
84+
rm -rf %{buildroot}
85+
86+
%post
87+
/sbin/install-info \
88+
--info-dir=%{_infodir} %{_infodir}/mu4e.info.gz || :
89+
%preun
90+
if [ $1 = 0 -a -f %{_infodir}/mu4e.info.gz ]; then
91+
/sbin/install-info --delete \
92+
--info-dir=%{_infodir} %{_infodir}/mu4e.info.gz || :
93+
fi
94+
95+
%post guile
96+
/sbin/install-info \
97+
--info-dir=%{_infodir} %{_infodir}/mu-guile.info.gz || :
98+
99+
%preun guile
100+
if [ $1 = 0 -a -f %{_infodir}/mu-guile.info.gz ]; then
101+
/sbin/install-info --delete \
102+
--info-dir=%{_infodir} %{_infodir}/mu-guile.info.gz || :
103+
fi
104+
105+
106+
%files
107+
%defattr(-,root,root)
108+
%{_bindir}/mu
109+
%{_mandir}/man1/*
110+
%{_mandir}/man5/*
111+
%{_datadir}/mu/*
112+
113+
%{_emacs_sitelispdir}/mu4e
114+
%{_emacs_sitelispdir}/mu4e/*.elc
115+
%{_emacs_sitelispdir}/mu4e/*.el
116+
%{_infodir}/mu4e.info.gz
117+
118+
%files gtk
119+
%{_bindir}/mug
120+
121+
%files guile
122+
%{_libdir}/libguile-mu.*
123+
%{_datadir}/guile/site/2.0/mu/*
124+
%{_datadir}/guile/site/2.0/mu.scm
125+
%{_infodir}/mu-guile.info.gz
126+
127+
%changelog
128+
* Wed Feb 12 2014 Santiago Saavedra <[email protected]> - 0.9.9.5-1
129+
- Create first SPEC.

0 commit comments

Comments
 (0)