a2f7975
%define pkg magit
a2f7975
%define pkgname Magit
a2f7975
%define git_pull_date 20090122
a2f7975
a2f7975
%if %($(pkg-config emacs) ; echo $?)
a2f7975
%define emacs_version 22.1
a2f7975
%define emacs_lispdir %{_datadir}/emacs/site-lisp
a2f7975
%define emacs_startdir %{_datadir}/emacs/site-lisp/site-start.d
a2f7975
%else
a2f7975
%define emacs_version %(pkg-config emacs --modversion)
a2f7975
%define emacs_lispdir %(pkg-config emacs --variable sitepkglispdir)
a2f7975
%define emacs_startdir %(pkg-config emacs --variable sitestartdir)
a2f7975
%endif
a2f7975
a2f7975
Name:           emacs-%{pkg}
Tom Moertel 10abfd3
Version:        1.2.0
aac3f5e
Release:        2%{?dist}
a2f7975
Summary:        Emacs interface to the most common Git operations
a2f7975
a2f7975
Group:          Applications/Editors
a2f7975
License:        GPLv3+ and GFDL+
Tom Moertel 5e2f6f3
URL:            http://magit.github.com/magit/
a2f7975
Tom Moertel 5e2f6f3
Source0:        http://github.com/downloads/magit/magit/magit-%{version}.tar.gz
a2f7975
a2f7975
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
a2f7975
a2f7975
BuildArch:      noarch
Tom Moertel 5e2f6f3
BuildRequires:  emacs emacs-el texinfo
a2f7975
Requires:       emacs(bin) >= %{emacs_version}
a2f7975
a2f7975
%description
a2f7975
%{pkgname} is an add-on package for GNU Emacs. It is an interface to
a2f7975
the Git source-code management system that aims to make the most
a2f7975
common operations convenient.
a2f7975
a2f7975
%package el
a2f7975
Summary:        Elisp source files for %{pkgname} under GNU Emacs
a2f7975
Group:          Applications/Editors
a2f7975
Requires:       %{name} = %{version}-%{release}
a2f7975
a2f7975
%description el
a2f7975
This package contains the elisp source files for %{pkgname} under GNU Emacs. You
a2f7975
do not need to install this package to run %{pkgname}. Install the %{name}
a2f7975
package to use %{pkgname} with GNU Emacs.
a2f7975
a2f7975
%prep
408a528
%setup -q -n magit-%{version}
a2f7975
a2f7975
%build
a2f7975
make
a2f7975
a2f7975
%install
a2f7975
rm -rf $RPM_BUILD_ROOT
Tom Moertel 5e2f6f3
make install DESTDIR=$RPM_BUILD_ROOT PREFIX=%{_prefix}
Tom Moertel 5e2f6f3
Tom Moertel 5e2f6f3
# clean up after magit's installer's assumptions
a2f7975
mkdir -p $RPM_BUILD_ROOT%{emacs_startdir}
Tom Moertel 5e2f6f3
mv $RPM_BUILD_ROOT/etc/emacs/site-start.d/50magit.el \
Tom Moertel 5e2f6f3
   $RPM_BUILD_ROOT%{emacs_startdir}/emacs-magit-mode.el
a2f7975
mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}/%{pkg}
Tom Moertel 5e2f6f3
mv $RPM_BUILD_ROOT%{emacs_lispdir}/*.el{,c} \
Tom Moertel 5e2f6f3
   $RPM_BUILD_ROOT%{emacs_lispdir}/%{pkg}
a2f7975
gzip -9 < magit.info > $RPM_BUILD_ROOT%{_infodir}/magit.info.gz
Tom Moertel 5e2f6f3
rm $RPM_BUILD_ROOT%{_infodir}/dir
a2f7975
a2f7975
%clean
a2f7975
rm -rf $RPM_BUILD_ROOT
a2f7975
a2f7975
a2f7975
%post
a2f7975
/sbin/install-info /usr/share/info/magit.info.gz /usr/share/info/dir
a2f7975
a2f7975
a2f7975
%preun
a2f7975
if [ "$1" = 0 ]; then
a2f7975
    /sbin/install-info --delete /usr/share/info/magit.info.gz /usr/share/info/dir
a2f7975
fi
a2f7975
a2f7975
a2f7975
%files
Tom Moertel 5e2f6f3
%doc README.md
a2f7975
%{emacs_lispdir}/%{pkg}/*.elc
a2f7975
%{emacs_startdir}/*.el
a2f7975
%{_infodir}/magit.info.gz
a2f7975
%dir %{emacs_lispdir}/%{pkg}
a2f7975
a2f7975
%files el
a2f7975
%{emacs_lispdir}/%{pkg}/*.el
a2f7975
a2f7975
%changelog
aac3f5e
* Wed Feb 13 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.2.0-2
aac3f5e
- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild
aac3f5e
Tom Moertel d93f69c
* Thu Jan 10 2013 Tom Moertel <tom@moertel.com> - 1.2.0-1
Tom Moertel 10abfd3
- Update to upstream version 1.2.0
Tom Moertel 10abfd3
c49d04f
* Wed Jul 18 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.1.1-2
c49d04f
- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild
c49d04f
Tom Moertel 7d7d521
* Wed Jan 25 2012 Tom Moertel <tom@moertel.com> - 1.1.1-1
Tom Moertel 7d7d521
- Update to upstream 1.1.1
Tom Moertel 7d7d521
df09b8b
* Fri Jan 13 2012 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 1.0.0-2
df09b8b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild
df09b8b
Tom Moertel 5e2f6f3
* Fri May 13 2011 Tom Moertel <tom@moertel.com> - 1.0.0-1
Tom Moertel 5e2f6f3
- Updated to upstream 1.0.0
7fe41d7
Tom Moertel 0eeaa39
* Wed Aug  4 2010 Tom Moertel <tom@moertel.com> - 0.8.2-1
Tom Moertel 0eeaa39
- Updated to upstream 0.8.2
Tom Moertel 0eeaa39
408a528
* Wed Aug 26 2009 Tom Moertel <tom@moertel.com> - 0.7-6
408a528
- Updated for Magit 0.7 final release (note: upstream removed FDL from tarball)
408a528
ddcda9b
* Fri Jul 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7-5.20090122git
ddcda9b
- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild
ddcda9b
fd73158
* Tue Feb 24 2009 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 0.7-4.20090122git
fd73158
- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild
fd73158
117b7c6
* Thu Jan 29 2009  <tom@moertel.com> - 0.7-3.20090122git
117b7c6
- Added missing build dependency: texinfo
117b7c6
a2f7975
* Tue Jan 27 2009  <tom@moertel.com> - 0.7-2.20090122git
a2f7975
- Made fixes per Fedora packaging review (thanks Jerry James)
a2f7975
a2f7975
* Fri Jan 23 2009  <tom@moertel.com> - 0.7-1.20090122git
a2f7975
- Initial packaging.