commit 61f40b69efdda6b6581ad22bb29a132261528fb4 Author: overweight <5324761+overweight@user.noreply.gitee.com> Date: Mon Sep 30 11:04:26 2019 -0400 Package init diff --git a/mercurial-5.1.tar.gz b/mercurial-5.1.tar.gz new file mode 100644 index 0000000..0832ea5 Binary files /dev/null and b/mercurial-5.1.tar.gz differ diff --git a/mercurial-site-start.el b/mercurial-site-start.el new file mode 100644 index 0000000..f169f95 --- /dev/null +++ b/mercurial-site-start.el @@ -0,0 +1,7 @@ +(autoload 'hg-mode "mercurial" "HG mode." t) +(autoload 'hg-help-overview "mercurial" "HG help." t) + +(autoload 'mq-mode "mq" + "MQ mode for Mercurial repositories with an MQ patch queue." t) +(autoload 'mq-edit-mode "mq" + "MQ edit mode for editing patch descriptions." t) diff --git a/mercurial.spec b/mercurial.spec new file mode 100644 index 0000000..44e9e57 --- /dev/null +++ b/mercurial.spec @@ -0,0 +1,135 @@ +%{!?python2_sitearch: %define python2_sitearch %(%{__python2} -c "from distutils.sysconfig import get_python2_lib; print get_python2_lib(1)")} + +Name: mercurial +Version: 5.1 +Release: 1 +Summary: Source control management tool +License: GPLv2+ +URL: http://www.selenic.com/mercurial/ +Source0: http://www.selenic.com/mercurial/release/%{name}-%{version}.tar.gz +Source1: mercurial-site-start.el + +BuildRequires: gcc python2 python2-devel bash-completion emacs-nox emacs-el pkgconfig gettext python2-docutils +Requires: python2 emacs-filesystem tk +Provides: hg = %{version}-%{release} emacs-mercurial <= 3.4.1 emacs-mercurial-el <= 3.4.1 +Provides: mercurial-hgk mercurial-chg +Obsoletes: emacs-mercurial <= 3.4.1 emacs-mercurial-el <= 3.4.1 +Obsoletes: mercurial-hgk mercurial-chg + +%description +Mercurial is a free, distributed source control management tool. +It efficiently handles projects of any size and offers an easy and intuitive interface. + +%package_help + +#Build sections +%prep +%autosetup -n %{name}-%{version} + +sed -i 's|python|python2|' %{_builddir}/%{name}-%{version}/Makefile %{_builddir}/%{name}-%{version}/doc/Makefile + +%build +%make_build + +pushd contrib/chg +make +popd + +%install +rm -rf %{buildroot} +%{__python2} setup.py install -O1 --root %{buildroot} --prefix %{_prefix} --record=%{name}.files +make install-doc DESTDIR=%{buildroot} MANDIR=%{_mandir} + +grep -v -e 'hgk.py*' -e %{python2_sitearch}/mercurial/ -e %{python2_sitearch}/hgext/ < %{name}.files > %{name}-base.files +grep 'hgk.py*' < %{name}.files > %{name}-hgk.files + +install -D -m 755 contrib/hgk %{buildroot}%{_libexecdir}/mercurial/hgk +install -m 755 contrib/hg-ssh %{buildroot}%{_bindir} + +bash_completion_dir=%{buildroot}$(pkg-config --variable=completionsdir bash-completion) +mkdir -p $bash_completion_dir +install -m 644 contrib/bash_completion $bash_completion_dir/hg + +zsh_completion_dir=%{buildroot}%{_datadir}/zsh/site-functions +mkdir -p $zsh_completion_dir +install -m 644 contrib/zsh_completion $zsh_completion_dir/_mercurial + +mkdir -p %{buildroot}%{_emacs_sitelispdir}/mercurial + +pushd contrib +for file in mercurial.el mq.el; do + #emacs -batch -l mercurial.el --no-site-file -f batch-byte-compile $file + %{_emacs_bytecompile} $file + install -p -m 644 $file ${file}c %{buildroot}%{_emacs_sitelispdir}/mercurial + rm ${file}c +done +popd + +pushd contrib/chg +make install DESTDIR=%{buildroot} PREFIX=%{_usr} MANDIR=%{_mandir}/man1 +popd + +mkdir -p %{buildroot}/%{_sysconfdir}/mercurial/hgrc.d + +mkdir -p %{buildroot}%{_emacs_sitestartdir} && install -m644 %SOURCE1 %{buildroot}%{_emacs_sitestartdir} + +cat >hgk.rc < certs.rc < %{name}-base-filtered.files + +%check + +%pre + +%preun + +%post + +%postun + +%files -f %{name}-base-filtered.files -f hg.lang +%doc CONTRIBUTORS COPYING doc/README doc/hg*.txt doc/hg*.html *.cgi contrib/*.fcgi contrib/*.wsgi contrib/*.svg +%config(noreplace) %{_sysconfdir}/mercurial/hgrc.d/certs.rc +%{_sysconfdir}/mercurial/hgrc.d/hgk.rc +%dir %{_sysconfdir}/mercurial +%dir %{_sysconfdir}/mercurial/hgrc.d +%{_bindir}/hg-ssh +%{_bindir}/chg +%dir %{_datadir}/zsh/ +%{_datadir}/zsh/site-functions/_mercurial +%{_datadir}/bash-completion/ +%{_datadir}/zsh/site-functions/ +%{_libexecdir}/mercurial/ +%{python2_sitearch}/mercurial +%{python2_sitearch}/hgext +%{_emacs_sitelispdir}/mercurial +%{_emacs_sitestartdir}/*.el + +%files help +%attr(644,root,root) +%{_mandir}/man?/hg*.gz +%{_mandir}/man?/chg.*.gz + +%changelog +* Wed Sep 04 2019 openEuler Buildteam - 5.1-1 +- Package init