Add a modest rpm .spec file and ensure that it's autoconf'd to keep step with the release version number.
Ignore the generated .spec file, but ensure it's distributed with any tarballs. Signed-off-by: Ben Walton <[email protected]> --- .gitignore | 1 + Makefile.am | 2 +- configure.ac | 3 ++- magit.spec.in | 44 ++++++++++++++++++++++++++++++++++++++++++++ 4 files changed, 48 insertions(+), 2 deletions(-) create mode 100644 magit.spec.in diff --git a/.gitignore b/.gitignore index aee86f2..acb2c78 100644 --- a/.gitignore +++ b/.gitignore @@ -35,3 +35,4 @@ /magit.pdf /magit.ps /magit-pkg.el +magit.spec diff --git a/Makefile.am b/Makefile.am index 2d8b2e9..0fd1afc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -7,7 +7,7 @@ sitestart_DATA = 50magit.el info_TEXINFOS = magit.texi CLEANFILES = magit.elc -EXTRA_DIST = magit.el 50magit.el +EXTRA_DIST = magit.el 50magit.el magit.spec %.elc: %.el @if [ $(builddir) != $(srcdir) ]; then ln $(srcdir)/$*.el .; fi diff --git a/configure.ac b/configure.ac index 3364b85..bc49026 100644 --- a/configure.ac +++ b/configure.ac @@ -9,6 +9,7 @@ AC_ARG_WITH([site-start], AC_SUBST([SITESTART]) AC_CONFIG_FILES([Makefile - magit-pkg.el]) + magit-pkg.el + magit.spec]) AC_OUTPUT diff --git a/magit.spec.in b/magit.spec.in new file mode 100644 index 0000000..c6eb800 --- /dev/null +++ b/magit.spec.in @@ -0,0 +1,44 @@ +Name: magit +Version: @VERSION@ +Release: 1%{?dist} +Summary: An Emacs Extension for Git +BuildArch: noarch +Group: Development/Tools +License: GPLv3 +URL: http://zagadka.vm.bytemark.co.uk/magit +Source0: %{url}/%{name}-%{version}.tar.gz +BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) + +BuildRequires: texinfo, autoconf, automake, emacs +Requires: git, emacs + +%description +Magit is an interface to the version control system Git, implemented +as an extension to Emacs. + +%prep +%setup -q + +%build +%configure --prefix=/usr --sysconfdir=/etc --with-site-start=/usr/share/emacs/site-lisp/site-start.d +make %{?_smp_mflags} + + +%install +make install DESTDIR=$RPM_BUILD_ROOT +rm $RPM_BUILD_ROOT/usr/share/info/dir + +%clean +rm -rf $RPM_BUILD_ROOT + +%files +%defattr(-,root,root,-) +/usr/share/emacs/site-lisp/site-start.d/50magit.el +/usr/share/emacs/site-lisp/magit.el +/usr/share/emacs/site-lisp/magit.elc +%doc README NEWS COPYING AUTHORS +/usr/share/info/magit.info.gz + +%changelog +* Sun Mar 14 2010 Ben Walton <[email protected]> +- Initial spec file creation. -- 1.7.0
