Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Loading…

Add spec file for building in RPM-based systems. #368

Merged
merged 1 commit into from

2 participants

@ssaavedra

With this file, in a RPM building environment you can use rpmbuild -bb path/to/mu.spec and obtain a set of RPM files (according to Fedora Packaging Guidelines) which can be installed on a system via rpm.

This specfile is working in a Fedora machine, other RPM distributions might have another name for some packages; but I'm not aware of them.

@djcb
Owner

Looks good, thanks!

However, the description of mu should not be 'email client'. It's an email search engine.

@ssaavedra

Woops, and there's another problem: I had a Patch1 directive and I didn't attach the patch. Instead of attaching a patch it seems more useful if I actually sent the patch, right?

The patch was related to mug not building in Fedora 20, because GTK_STOCK_* is now deprecated. In order to make it build, I changed GTK_STOCK_* for their literal values ("gtk-go-up" and so on). What do you think about it?

With GTK_STOCK_* deprecated the gtk/gtkstock.h does not get loaded in Fedora with the #include <gtk/gtk.h> line.

@ssaavedra

Woops, I was building the spec file against released tag 0.9.9.5, but the GTK_STOCK things are already removed in master branch.
I didn't check that..., I have to change a few bits to the spec file.

@ssaavedra

Sorry for the multiple comments. I have now changed the spec file (and moved it to contrib/) so that it builds against current not-released-yet 0.9.9.6pre2 with that version for the RPM file (because it makes sense that the RPM has the same version as the configure.ac file).

@ssaavedra ssaavedra 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.
01ba6a7
@djcb djcb merged commit 848189d into from
@djcb
Owner

Looks good -- thanks, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 15, 2014
  1. @ssaavedra

    Add spec file for building in RPM-based systems.

    ssaavedra authored
    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.
This page is out of date. Refresh to see the latest.
Showing with 129 additions and 0 deletions.
  1. +129 −0 contrib/mu.spec
View
129 contrib/mu.spec
@@ -0,0 +1,129 @@
+
+# These refer to the release version
+# When 0.9.9.6 gets out, remove the global pre line
+%global pre pre2
+%global rel 1
+
+Summary: A lightweight email search engine for Maildirs
+Name: mu
+Version: 0.9.9.6
+URL: https://github.com/djcb/mu
+# From Packaging:NamingGuidelines for pre-relase versions:
+# Release: 0.%{X}.%{alphatag} where %{X} is the release number
+%if %{pre}
+Release: 0.%{rel}.%{prerelease}%{?dist}
+%else
+Release: %{rel}%{?dist}
+%endif
+
+License: GPLv3
+Group: Applications/Internet
+BuildRoot: %{_tmppath}/%{name}-%{version}-build
+
+# Source is at ssaavedra repo because djcb has not yet this version tag created
+Source0: http://github.com/ssaavedra/%{name}/archive/v%{version}%{?pre}.tar.gz
+BuildRequires: emacs-el
+BuildRequires: emacs
+BuildRequires: gmime-devel
+BuildRequires: guile-devel
+BuildRequires: xapian-core-devel
+BuildRequires: libuuid-devel
+BuildRequires: texinfo
+Requires: gmime
+Requires: guile
+Requires: xapian-core-libs
+Requires: emacs-filesystem >= %{_emacs_version}
+
+
+%description
+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?
+Enter mu.
+'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).
+
+%package gtk
+Group: Applications/Internet
+Summary: GUI for using mu (called mug)
+BuildRequires: gtk3-devel
+BuildRequires: webkitgtk3-devel
+Requires: gtk3
+Requires: gmime
+Requires: webkitgtk3
+Requires: mu = %{version}-%{release}
+
+%description gtk
+Mug is a simple GUI for mu from version 0.9.
+
+%package guile
+Group: Applications/Internet
+Summary: Guile scripting capabilities for mu
+Requires: guile
+Requires: mu = %{version}-%{release}
+Requires(post): info
+Requires(preun): info
+
+%description guile
+Bindings for Guile to interact with mu.
+
+
+%prep
+%setup -n %{name}-%{version}%{?pre} -q
+
+%build
+autoreconf -i
+%configure
+make %{?_smp_mflags}
+
+%install
+rm -rf %{buildroot}
+make install DESTDIR=%{buildroot}
+install -p -c -m 755 %{_builddir}/%{buildsubdir}/toys/mug/mug %{buildroot}%{_bindir}/mug
+cp -p %{_builddir}/%{buildsubdir}/mu4e/*.el %{buildroot}%{_emacs_sitelispdir}/mu4e/
+rm -f %{buildroot}%{_infodir}/dir
+
+%clean
+rm -rf %{buildroot}
+
+%post
+/sbin/install-info \
+ --info-dir=%{_infodir} %{_infodir}/mu4e.info.gz || :
+%preun
+if [ $1 = 0 -a -f %{_infodir}/mu4e.info.gz ]; then
+ /sbin/install-info --delete \
+ --info-dir=%{_infodir} %{_infodir}/mu4e.info.gz || :
+fi
+
+%post guile
+/sbin/install-info \
+ --info-dir=%{_infodir} %{_infodir}/mu-guile.info.gz || :
+
+%preun guile
+if [ $1 = 0 -a -f %{_infodir}/mu-guile.info.gz ]; then
+ /sbin/install-info --delete \
+ --info-dir=%{_infodir} %{_infodir}/mu-guile.info.gz || :
+fi
+
+
+%files
+%defattr(-,root,root)
+%{_bindir}/mu
+%{_mandir}/man1/*
+%{_mandir}/man5/*
+%{_datadir}/mu/*
+
+%{_emacs_sitelispdir}/mu4e
+%{_emacs_sitelispdir}/mu4e/*.elc
+%{_emacs_sitelispdir}/mu4e/*.el
+%{_infodir}/mu4e.info.gz
+
+%files gtk
+%{_bindir}/mug
+
+%files guile
+%{_libdir}/libguile-mu.*
+%{_datadir}/guile/site/2.0/mu/*
+%{_datadir}/guile/site/2.0/mu.scm
+%{_infodir}/mu-guile.info.gz
+
+%changelog
+* Wed Feb 12 2014 Santiago Saavedra <ssaavedra@gpul.org> - 0.9.9.5-1
+- Create first SPEC.
Something went wrong with that request. Please try again.