Skip to content
This repository

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

Merged
merged 1 commit into from 5 months ago

2 participants

Santiago Saavedra Dirk-Jan C. Binnema
Santiago Saavedra

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.

Dirk-Jan C. Binnema
Owner

Looks good, thanks!

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

Santiago Saavedra

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.

Santiago Saavedra

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.

Santiago Saavedra

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).

Santiago Saavedra 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
Dirk-Jan C. Binnema djcb merged commit 848189d into from
Dirk-Jan C. Binnema djcb closed this
Dirk-Jan C. Binnema
Owner

Looks good -- thanks, merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Showing 1 unique commit by 1 author.

Feb 15, 2014
Santiago Saavedra 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
This page is out of date. Refresh to see the latest.

Showing 1 changed file with 129 additions and 0 deletions. Show diff stats Hide diff stats

  1. +129 0 contrib/mu.spec
129 contrib/mu.spec
... ... @@ -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 <ssaavedra@gpul.org> - 0.9.9.5-1
  129 +- Create first SPEC.

Tip: You can add notes to lines in a file. Hover to the left of a line to make a note

Something went wrong with that request. Please try again.