Fix to comply with emacs packaging guidelines
This commit is contained in:
parent
5e35fe96e3
commit
adcde5c189
144
mercurial.spec
144
mercurial.spec
@ -1,7 +1,7 @@
|
|||||||
Summary: A fast, lightweight distributed source control management system
|
Summary: A fast, lightweight distributed source control management system
|
||||||
Name: mercurial
|
Name: mercurial
|
||||||
Version: 1.0
|
Version: 1.0
|
||||||
Release: 4%{?dist}
|
Release: 6%{?dist}
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
URL: http://www.selenic.com/mercurial/
|
URL: http://www.selenic.com/mercurial/
|
||||||
@ -20,19 +20,83 @@ Quick start: http://www.selenic.com/mercurial/wiki/index.cgi/QuickStart
|
|||||||
Tutorial: http://www.selenic.com/mercurial/wiki/index.cgi/Tutorial
|
Tutorial: http://www.selenic.com/mercurial/wiki/index.cgi/Tutorial
|
||||||
Extensions: http://www.selenic.com/mercurial/wiki/index.cgi/CategoryExtension
|
Extensions: http://www.selenic.com/mercurial/wiki/index.cgi/CategoryExtension
|
||||||
|
|
||||||
%package emacs
|
%define pkg mercurial
|
||||||
|
#%define pkgname Foo
|
||||||
|
|
||||||
|
# If the emacs-el package has installed a pkgconfig file, use that to determine
|
||||||
|
# install locations and Emacs version at build time, otherwise set defaults.
|
||||||
|
%if %($(pkg-config emacs) ; echo $?)
|
||||||
|
%define emacs_version 22.1
|
||||||
|
%define emacs_lispdir %{_datadir}/emacs/site-lisp
|
||||||
|
%define emacs_startdir %{_datadir}/emacs/site-lisp/site-start.d
|
||||||
|
%else
|
||||||
|
%define emacs_version %(pkg-config emacs --modversion)
|
||||||
|
%define emacs_lispdir %(pkg-config emacs --variable sitepkglispdir)
|
||||||
|
%define emacs_startdir %(pkg-config emacs --variable sitestartdir)
|
||||||
|
%endif
|
||||||
|
|
||||||
|
# If the xemacs-devel package has installed a pkgconfig file, use that to determine
|
||||||
|
# install locations and Emacs version at build time, otherwise set defaults.
|
||||||
|
%if %($(pkg-config xemacs) ; echo $?)
|
||||||
|
%define xemacs_version 21.5
|
||||||
|
%define xemacs_lispdir %{_datadir}/xemacs/site-packages
|
||||||
|
%define xemacs_startdir %{_datadir}/xemacs/site-packages/site-start.d
|
||||||
|
%else
|
||||||
|
%define xemacs_version %(pkg-config xemacs --modversion)
|
||||||
|
%define xemacs_lispdir %(pkg-config xemacs --variable sitepkglispdir)
|
||||||
|
%define xemacs_startdir %(pkg-config xemacs --variable sitestartdir)
|
||||||
|
%endif
|
||||||
|
|
||||||
|
%package -n emacs-%{pkg}
|
||||||
Summary: Mercurial version control system support for Emacs
|
Summary: Mercurial version control system support for Emacs
|
||||||
Group: Applications/Editors
|
Group: Applications/Editors
|
||||||
Requires: hg = %{version}-%{release}, emacs-common
|
Requires: hg = %{version}-%{release}, emacs-common
|
||||||
|
Requires: emacs(bin) >= %{emacs_version}
|
||||||
|
|
||||||
%description emacs
|
|
||||||
%{summary}.
|
%description -n emacs-%{pkg}
|
||||||
|
Contains byte compiled elisp packages for %{pkg}.
|
||||||
|
To get started: start emacs, load hg-mode with M-x hg-mode, and show
|
||||||
|
help with C-c h h
|
||||||
|
|
||||||
|
%package -n emacs-%{pkg}-el
|
||||||
|
Summary: Elisp source files for %{pkg} under GNU Emacs
|
||||||
|
Group: Development/Tools
|
||||||
|
Requires: emacs-%{pkg} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n emacs-%{pkg}-el
|
||||||
|
This package contains the elisp source files for %{pkg} under GNU Emacs. You
|
||||||
|
do not need to install this package to run %{pkg}. Install the emacs-%{pkg}
|
||||||
|
package to use %{pkg} with GNU Emacs.
|
||||||
|
|
||||||
|
%package -n xemacs-%{pkg}
|
||||||
|
Summary: Compiled elisp files to run %{pkg} under XEmacs
|
||||||
|
Group: Development/Tools
|
||||||
|
Requires: xemacs(bin) >= %{xemacs_version}
|
||||||
|
|
||||||
|
%description -n xemacs-%{pkg}
|
||||||
|
This package contains the byte compiled elisp packages to use %{pkg} with
|
||||||
|
XEmacs.
|
||||||
|
To get started: start xemacs, load hg-mode with M-x hg-mode, and show
|
||||||
|
help with C-c h h
|
||||||
|
|
||||||
|
|
||||||
|
%package -n xemacs-%{pkg}-el
|
||||||
|
Summary: Elisp source files for %{pkg} under XEmacs
|
||||||
|
Group: Development/Tools
|
||||||
|
Requires: xemacs-%{pkg} = %{version}-%{release}
|
||||||
|
|
||||||
|
%description -n xemacs-%{pkg}-el
|
||||||
|
This package contains the elisp source files for %{pkg} under XEmacs. You do
|
||||||
|
not need to install this package to run %{pkg}. Install the xemacs-%{pkg}
|
||||||
|
package to use %{pkg} with XEmacs.
|
||||||
|
|
||||||
%package hgk
|
%package hgk
|
||||||
Summary: Hgk interface for mercurial
|
Summary: Hgk interface for mercurial
|
||||||
Group: Development/Tools
|
Group: Development/Tools
|
||||||
Requires: hg = %{version}-%{release}, tk
|
Requires: hg = %{version}-%{release}, tk
|
||||||
|
|
||||||
|
|
||||||
%description hgk
|
%description hgk
|
||||||
A Mercurial extension for displaying the change history graphically
|
A Mercurial extension for displaying the change history graphically
|
||||||
using Tcl/Tk. Displays branches and merges in an easily
|
using Tcl/Tk. Displays branches and merges in an easily
|
||||||
@ -53,6 +117,9 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
python setup.py install -O1 --root $RPM_BUILD_ROOT --prefix %{_prefix} --record=%{name}.files
|
python setup.py install -O1 --root $RPM_BUILD_ROOT --prefix %{_prefix} --record=%{name}.files
|
||||||
make install-doc DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir}
|
make install-doc DESTDIR=$RPM_BUILD_ROOT MANDIR=%{_mandir}
|
||||||
|
|
||||||
|
grep -v 'hgk.py*' < %{name}.files > %{name}-base.files
|
||||||
|
grep 'hgk.py*' < %{name}.files > %{name}-hgk.files
|
||||||
|
|
||||||
install contrib/hgk $RPM_BUILD_ROOT%{_bindir}
|
install contrib/hgk $RPM_BUILD_ROOT%{_bindir}
|
||||||
install contrib/convert-repo $RPM_BUILD_ROOT%{_bindir}/mercurial-convert-repo
|
install contrib/convert-repo $RPM_BUILD_ROOT%{_bindir}/mercurial-convert-repo
|
||||||
install contrib/hg-ssh $RPM_BUILD_ROOT%{_bindir}
|
install contrib/hg-ssh $RPM_BUILD_ROOT%{_bindir}
|
||||||
@ -66,25 +133,43 @@ zsh_completion_dir=$RPM_BUILD_ROOT%{_datadir}/zsh/site-functions
|
|||||||
mkdir -p $zsh_completion_dir
|
mkdir -p $zsh_completion_dir
|
||||||
install -m 644 contrib/zsh_completion $zsh_completion_dir/_mercurial
|
install -m 644 contrib/zsh_completion $zsh_completion_dir/_mercurial
|
||||||
|
|
||||||
lisp_dir=$RPM_BUILD_ROOT%{_datadir}/emacs/site-lisp
|
mkdir -p $RPM_BUILD_ROOT%{emacs_lispdir}
|
||||||
mkdir -p $lisp_dir
|
mkdir -p $RPM_BUILD_ROOT%{xemacs_lispdir}
|
||||||
install -m 644 contrib/mercurial.el $lisp_dir
|
pushd contrib
|
||||||
xlisp_dir=$RPM_BUILD_ROOT%{_datadir}/xemacs/site-packages/lisp
|
for file in mercurial.el mq.el; do
|
||||||
mkdir -p $xlisp_dir
|
emacs -batch --no-site-file -f batch-byte-compile $file
|
||||||
install -m 644 contrib/mercurial.el $xlisp_dir
|
install -m 644 $file ${file}c $RPM_BUILD_ROOT%{emacs_lispdir}
|
||||||
|
rm ${file}c
|
||||||
|
xemacs -batch -l mercurial.el --no-site-file -f batch-byte-compile $file
|
||||||
|
install -m 644 $file ${file}c $RPM_BUILD_ROOT%{xemacs_lispdir}
|
||||||
|
rm ${file}c
|
||||||
|
done
|
||||||
|
popd
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
|
mkdir -p $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
|
||||||
|
|
||||||
mkdir -p $lisp_dir/site-start.d/ && install -m644 %SOURCE1 $lisp_dir/site-start.d/
|
mkdir -p $RPM_BUILD_ROOT%{emacs_startdir} && install -m644 %SOURCE1 $RPM_BUILD_ROOT%{emacs_startdir}
|
||||||
mkdir -p $xlisp_dir/site-start.d/ && install -m644 %SOURCE1 $xlisp_dir/site-start.d/
|
mkdir -p $RPM_BUILD_ROOT%{xemacs_startdir} && install -m644 %SOURCE1 $RPM_BUILD_ROOT%{xemacs_startdir}
|
||||||
|
|
||||||
|
cat >hgk.rc <<EOF
|
||||||
|
[extensions]
|
||||||
|
# enable hgk extension ('hg help' shows 'view' as a command)
|
||||||
|
hgk=
|
||||||
|
EOF
|
||||||
|
install hgk.rc $RPM_BUILD_ROOT/%{_sysconfdir}/mercurial/hgrc.d
|
||||||
|
|
||||||
|
install contrib/mergetools.hgrc $RPM_BUILD_ROOT%{_sysconfdir}/mercurial/hgrc.d
|
||||||
|
|
||||||
%clean
|
%clean
|
||||||
rm -rf $RPM_BUILD_ROOT
|
rm -rf $RPM_BUILD_ROOT
|
||||||
|
|
||||||
%files -f %{name}.files
|
%files -f %{name}-base.files
|
||||||
%defattr(-,root,root,-)
|
%defattr(-,root,root,-)
|
||||||
%doc CONTRIBUTORS COPYING doc/README doc/hg*.txt doc/hg*.html doc/ja *.cgi contrib/*.fcgi
|
%doc CONTRIBUTORS COPYING doc/README doc/hg*.txt doc/hg*.html doc/ja *.cgi contrib/*.fcgi
|
||||||
%doc %attr(644,root,root) %{_mandir}/man?/hg*.gz
|
%doc %attr(644,root,root) %{_mandir}/man?/hg*.gz
|
||||||
%doc %attr(644,root,root) contrib/*.svg contrib/*.hgrc
|
%doc %attr(644,root,root) contrib/*.svg contrib/sample.hgrc
|
||||||
%{_sysconfdir}/bash_completion.d/mercurial.sh
|
%{_sysconfdir}/bash_completion.d/mercurial.sh
|
||||||
%{_datadir}/zsh/site-functions/_mercurial
|
%{_datadir}/zsh/site-functions/_mercurial
|
||||||
%{_bindir}/hg-ssh
|
%{_bindir}/hg-ssh
|
||||||
@ -93,20 +178,39 @@ rm -rf $RPM_BUILD_ROOT
|
|||||||
%{_bindir}/mercurial-convert-repo
|
%{_bindir}/mercurial-convert-repo
|
||||||
%dir %{_sysconfdir}/mercurial
|
%dir %{_sysconfdir}/mercurial
|
||||||
%dir %{_sysconfdir}/mercurial/hgrc.d
|
%dir %{_sysconfdir}/mercurial/hgrc.d
|
||||||
|
%{_sysconfdir}/mercurial/hgrc.d/mergetools.hgrc
|
||||||
|
|
||||||
%files emacs
|
%files -n emacs-%{pkg}
|
||||||
%{_datadir}/emacs/site-lisp/mercurial.el
|
%{emacs_lispdir}/*.elc
|
||||||
%{_datadir}/xemacs/site-packages/lisp/mercurial.el
|
%{emacs_startdir}/*.el
|
||||||
%{_datadir}/emacs/site-lisp/site-start.d/*
|
|
||||||
%{_datadir}/xemacs/site-packages/lisp/site-start.d/*
|
|
||||||
|
|
||||||
%files hgk
|
%files -n emacs-%{pkg}-el
|
||||||
|
%{emacs_lispdir}/*.el
|
||||||
|
|
||||||
|
%files -n xemacs-%{pkg}
|
||||||
|
%{xemacs_lispdir}/*.elc
|
||||||
|
%{xemacs_startdir}/*.el
|
||||||
|
|
||||||
|
%files -n xemacs-%{pkg}-el
|
||||||
|
%{xemacs_lispdir}/*.el
|
||||||
|
|
||||||
|
|
||||||
|
%files hgk -f %{name}-hgk.files
|
||||||
%{_bindir}/hgk
|
%{_bindir}/hgk
|
||||||
|
%{_sysconfdir}/mercurial/hgrc.d/hgk.rc
|
||||||
|
|
||||||
#%check
|
#%check
|
||||||
#cd tests && python run-tests.py
|
#cd tests && python run-tests.py
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Tue Apr 8 2008 Neal Becker <ndbecker2@gmail.com> - 1.0-6
|
||||||
|
- fix to comply with emacs packaging guidelines
|
||||||
|
|
||||||
|
* Thu Mar 27 2008 Neal Becker <ndbecker2@gmail.com> - 1.0-5
|
||||||
|
- Move hgk-related py files to hgk
|
||||||
|
- Put mergetools.hgrc in /etc/mercurial/hgrc.d
|
||||||
|
- Add hgk.rc and put in /etc/mercurial/hgrc.d
|
||||||
|
|
||||||
* Wed Mar 26 2008 Neal Becker <ndbecker2@gmail.com> - 1.0-4
|
* Wed Mar 26 2008 Neal Becker <ndbecker2@gmail.com> - 1.0-4
|
||||||
- Rename mercurial-site-start -> mercurial-site-start.el
|
- Rename mercurial-site-start -> mercurial-site-start.el
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user