[hgview/f19] First official Fedora package

Mads Kiilerich kiilerix at fedoraproject.org
Sun Sep 1 19:39:54 UTC 2013


commit 7f72bec63d992823ea474f13f73f2af5fc74db7b
Author: Mads Kiilerich <mads at kiilerich.com>
Date:   Sun Sep 1 21:39:43 2013 +0200

    First official Fedora package

 .gitignore            |    1 +
 hgview-man-path.patch |   20 ++++++
 hgview.png            |  Bin 0 -> 386 bytes
 hgview.spec           |  173 +++++++++++++++++++++++++++++++++++++++++++++++++
 sources               |    1 +
 5 files changed, 195 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..4647b60 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/hgview-1.7.1.tar.gz
diff --git a/hgview-man-path.patch b/hgview-man-path.patch
new file mode 100644
index 0000000..cb92926
--- /dev/null
+++ b/hgview-man-path.patch
@@ -0,0 +1,20 @@
+--- doc/Makefile
++++ doc/Makefile
+@@ -3,7 +3,7 @@
+ MAN=$(SOURCES:%.txt=%)
+ HTML=$(SOURCES:%.txt=%.html)
+ PREFIX=/usr/local
+-MANDIR=$(PREFIX)/man
++MANDIR=$(PREFIX)/share/man
+ INSTALL=install -c
+ 
+ all: man html
+@@ -25,7 +25,7 @@
+ 	for i in $(MAN) ; do \
+ 	  subdir=`echo $$i | sed -n 's/..*\.\([0-9]\)$$/man\1/p'` ; \
+ 	  $(INSTALL) -d $(DESTDIR)$(MANDIR)/$$subdir && \
+-	  $(INSTALL) $$i $(DESTDIR)$(MANDIR)/$$subdir ; \
++	  $(INSTALL) -m 644 $$i $(DESTDIR)$(MANDIR)/$$subdir ; \
+ 	done
+ 
+ clean:
diff --git a/hgview.png b/hgview.png
new file mode 100644
index 0000000..0d396f7
Binary files /dev/null and b/hgview.png differ
diff --git a/hgview.spec b/hgview.spec
new file mode 100644
index 0000000..6174b3f
--- /dev/null
+++ b/hgview.spec
@@ -0,0 +1,173 @@
+Name:           hgview
+Version:        1.7.1
+Release:        6%{?dist}
+Summary:        Mercurial interactive Qt based history viewer
+
+License:        GPLv2+
+URL:            http://www.logilab.org/project/hgview
+Source0:        http://download.logilab.org/pub/%{name}/%{name}-%{version}.tar.gz
+# http://www.logilab.org/ticket/112566
+Source1:        %{name}.png
+# http://www.logilab.org/ticket/103668
+Patch1:         hgview-man-path.patch
+
+BuildArch:      noarch
+BuildRequires:  python2-devel
+BuildRequires:  PyQt4-devel
+BuildRequires:  asciidoc
+BuildRequires:  xmlto
+BuildRequires:  mercurial
+BuildRequires:  desktop-file-utils
+
+Requires:       %{name}-common = %{version}-%{release}
+Requires:       python-docutils
+Requires:       PyQt4
+Requires:       qscintilla-python
+
+%description
+hgview is a simple tool aiming at visually navigating Mercurial repository
+history. It has been written with efficiency in mind, both in terms
+of computational efficiency and user experience efficiency.
+
+This main package provides a Qt based GUI. A curses based UI is also available.
+
+
+%package -n %{name}-curses
+Summary:        Mercurial interactive curses based history viewer
+Requires:       %{name}-common = %{version}-%{release}
+Requires:       python-urwid, python-pygments, python-inotify
+
+%description -n %{name}-curses
+hgview is a simple tool aiming at visually navigating Mercurial repository
+history. It has been written with efficiency in mind, both in terms
+of computational efficiency and user experience efficiency.
+
+This package provides a curses based UI. A Qt based GUI is also available.
+
+
+%package -n %{name}-common
+Summary:        Common files for the hgview Mercurial interactive history viewer
+Requires:       mercurial
+
+%description -n %{name}-common
+hgview is a simple tool aiming at visually navigating Mercurial repository
+history. It has been written with efficiency in mind, both in terms
+of computational efficiency and user experience efficiency.
+
+This package provides common files for the Qt and curses based UIs.
+
+
+%prep
+%setup -q
+%patch1
+
+
+%build
+%{__python} setup.py build
+
+
+%install
+%{__python} setup.py install -O1 --skip-build --root $RPM_BUILD_ROOT
+
+# Mercurial do not have a noarch hgext directory - storing the extension in
+# hgviewlib seems like the least bad option.
+mv $RPM_BUILD_ROOT%{python_sitelib}/hgext/hgview.py* $RPM_BUILD_ROOT%{python_sitelib}/hgviewlib/
+
+mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/mercurial/hgrc.d/
+cat > $RPM_BUILD_ROOT%{_sysconfdir}/mercurial/hgrc.d/hgview.rc << EOT
+[extensions]
+# Enable hgview extension to be able to invoke hgview as 'hg hgview' or 'hg qv'.
+#hgview = %{python_sitelib}/hgviewlib/hgview.py
+
+[hgview]
+# hgview will by default use the qt interface if available - set interface to
+# curses for console mode.
+#interface = qt
+#interface = curses
+EOT
+
+# http://www.logilab.org/ticket/112566
+cat > %{name}.desktop << EOT
+[Desktop Entry]
+Type=Application
+Name=hgview
+GenericName=Version Control GUI
+Comment=GUI application for using Mercurial
+Icon=hgview
+Exec=hgview -I qt
+Categories=Development;RevisionControl;
+EOT
+desktop-file-install --dir=$RPM_BUILD_ROOT%{_datadir}/applications %{name}.desktop
+
+install -m 644 -D -p %{SOURCE1} $RPM_BUILD_ROOT%{_datadir}/pixmaps/%{name}.png
+
+
+%files
+%{python_sitelib}/hgviewlib/qt4/
+%{_datadir}/applications/%{name}.desktop
+%{_datadir}/pixmaps/%{name}.png
+
+%files -n %{name}-curses
+%{python_sitelib}/hgviewlib/curses/
+
+%files -n %{name}-common
+%doc COPYING README
+%{_mandir}/man1/%{name}.1.*
+%config(noreplace) %{_sysconfdir}/mercurial/hgrc.d/hgview.rc
+%{_bindir}/%{name}
+%{python_sitelib}/%{name}-*.egg-info
+%dir %{python_sitelib}/hgviewlib/
+%{python_sitelib}/hgviewlib/*.py*
+%{python_sitelib}/hgviewlib/hgpatches
+
+
+%changelog
+* Sun Sep 01 2013 Mads Kiilerich <mads at kiilerich.com> - 1.7.1-6
+- First official Fedora package
+
+* Sat Jun 22 2013 Mads Kiilerich <mads at kiilerich.com> - 1.7.1-5
+- Don't assume there is a noarch hgext directory - just use hgviewlib.
+
+* Wed Jun 12 2013 Mads Kiilerich <mads at kiilerich.com> - 1.7.1-4
+- Update python dependency to python2-devel
+- Preserve timestamp of pixmap png
+
+* Sun Jun 09 2013 Mads Kiilerich <mads at kiilerich.com> - 1.7.1-3
+- Move duplicate files to -common package
+
+* Wed Jun 05 2013 Mads Kiilerich <mads at kiilerich.com> - 1.7.1-2
+- Relax the requirements to Mercurial version
+- Use explicit path to hg extension to make it work on 64 bit
+
+* Sat Mar 09 2013 Mads Kiilerich <mads at kiilerich.com> - 1.7.1-1
+- hgview-1.7.1
+
+* Sat Nov 24 2012 Mads Kiilerich <mads at kiilerich.com> - 1.7.0-1
+- hgview-1.7.0
+
+* Mon Nov 05 2012 Mads Kiilerich <mads at kiilerich.com> - 1.6.2-2
+- claim support for Mercurial 2.4.x
+
+* Sat Aug 25 2012 Mads Kiilerich <mads at kiilerich.com> - 1.6.2-1
+- hgview-1.6.2
+
+* Thu Feb 16 2012 Mads Kiilerich <mads at kiilerich.com> - 1.5.0-1
+- hgview-1.5.0
+- make qt and curses support optional
+
+* Thu Nov 03 2011 Mads Kiilerich <mads at kiilerich.com> - 1.4.0-2
+- Update package description
+- Update spec to the new curses UI introduced in 1.4.0
+- Install Mercurial configuration template, nothing enabled by default
+- Drop docs ChangeLog (outdated) and README (no relevant information for package users)
+- Don't set python_sitelib and don't clean $RPM_BUILD_ROOT
+
+* Fri Oct 07 2011 Mads Kiilerich <mads at kiilerich.com> - 1.4.0-1
+- hgview-1.4.0
+
+* Sat Sep 10 2011 Mads Kiilerich <mads at kiilerich.com> - 1.3.0-2
+- Minor tweaks to requirements and use of macros, based on comments from Volker
+  Fröhlich
+
+* Thu Sep 08 2011 Mads Kiilerich <mads at kiilerich.com> - 1.3.0-1
+- Initial package for Fedora
diff --git a/sources b/sources
index e69de29..ef327c1 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+b195e8a95c5dd0e281e06ac6000c728f  hgview-1.7.1.tar.gz


More information about the scm-commits mailing list