[recutils/f15] Initial import.

Daiki Ueno ueno at fedoraproject.org
Thu Oct 20 00:56:42 UTC 2011


commit c9c3c4396f27947f5409d2a40b20b50abfedd788
Author: Daiki Ueno <ueno at unixuser.org>
Date:   Thu Oct 20 09:56:37 2011 +0900

    Initial import.

 .gitignore                                         |    1 +
 ...-size-constraint-handling-on-LP64-systems.patch |   37 ++++++
 rec-mode-init.el                                   |    4 +
 recutils-shared-lib-calls-exit.patch               |   24 ++++
 recutils.spec                                      |  119 ++++++++++++++++++++
 sources                                            |    1 +
 6 files changed, 186 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..75c5aa6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/recutils-1.3.tar.gz
diff --git a/0001-Fix-size-constraint-handling-on-LP64-systems.patch b/0001-Fix-size-constraint-handling-on-LP64-systems.patch
new file mode 100644
index 0000000..e28bc0d
--- /dev/null
+++ b/0001-Fix-size-constraint-handling-on-LP64-systems.patch
@@ -0,0 +1,37 @@
+From ac373461c77420992147023e2db5a4fcd9933035 Mon Sep 17 00:00:00 2001
+From: Daiki Ueno <ueno at unixuser.org>
+Date: Mon, 16 May 2011 15:00:39 +0900
+Subject: [PATCH] Fix size constraint handling on LP64 systems.
+
+---
+ src/rec-utils.c |    6 +++---
+ 1 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/rec-utils.c b/src/rec-utils.c
+index a79c24d..bab1927 100644
+--- a/src/rec-utils.c
++++ b/src/rec-utils.c
+@@ -290,7 +290,7 @@ rec_extract_size (char *str)
+ {
+   char *p;
+   char *condition_str;
+-  size_t res;
++  int res;
+ 
+   if (!rec_match (str, REC_INT_SIZE_RE))
+     {
+@@ -301,9 +301,9 @@ rec_extract_size (char *str)
+   rec_skip_blanks (&p);
+   rec_parse_regexp (&p, "^[><]=?", &condition_str);
+   rec_skip_blanks (&p);
+-  rec_parse_int (&p, (int *) &res);
++  rec_parse_int (&p, &res);
+ 
+-  return res;
++  return (size_t) res;
+ }
+ 
+ enum rec_size_condition_e
+-- 
+1.7.5.1
+
diff --git a/rec-mode-init.el b/rec-mode-init.el
new file mode 100644
index 0000000..9db5c20
--- /dev/null
+++ b/rec-mode-init.el
@@ -0,0 +1,4 @@
+;; rec-mode for recfiles
+
+(autoload 'rec-mode "rec-mode" " mode." t)
+(add-to-list 'auto-mode-alist '("\\.rec\\(\\.in\\)?$" . rec-mode))
diff --git a/recutils-shared-lib-calls-exit.patch b/recutils-shared-lib-calls-exit.patch
new file mode 100644
index 0000000..b650e46
--- /dev/null
+++ b/recutils-shared-lib-calls-exit.patch
@@ -0,0 +1,24 @@
+diff -ru recutils-1.3.orig/src/rec-sex.c recutils-1.3/src/rec-sex.c
+--- recutils-1.3.orig/src/rec-sex.c	2011-01-18 06:04:35.000000000 +0900
++++ recutils-1.3/src/rec-sex.c	2011-10-18 14:59:04.018011119 +0900
+@@ -400,7 +400,7 @@
+     case REC_SEX_NOVAL:
+       {
+         fprintf (stderr, "Application bug: REC_SEX_NOVAL node found.\nPlease report this!\n");
+-        exit (EXIT_FAILURE);
++        abort ();
+         break;
+       }
+       /* Operations.  */
+diff -ru recutils-1.3.orig/src/rec-types.c recutils-1.3/src/rec-types.c
+--- recutils-1.3.orig/src/rec-types.c	2011-01-31 05:14:23.000000000 +0900
++++ recutils-1.3/src/rec-types.c	2011-10-18 14:59:37.154198002 +0900
+@@ -426,7 +426,7 @@
+         /* This point should not be reached.  */
+         fprintf (stderr,
+                  _("internal error: rec-types: got REC_TYPE_NONE from rec_type_parse_type_kind() in rec_type_new().\n"));
+-        exit (EXIT_FAILURE);
++        abort ();
+         break;
+       }
+     }
diff --git a/recutils.spec b/recutils.spec
new file mode 100644
index 0000000..8b5c455
--- /dev/null
+++ b/recutils.spec
@@ -0,0 +1,119 @@
+Name:		recutils
+Version:	1.3
+Release:	4%{?dist}
+Summary:	A set of tools to access GNU recfile databases
+
+License:	GPLv3+
+URL:		http://www.gnu.org/software/recutils/
+Source0:	ftp://ftp.gnu.org/gnu/recutils/%{name}-%{version}.tar.gz
+Source1:	rec-mode-init.el
+Patch0:		0001-Fix-size-constraint-handling-on-LP64-systems.patch
+Patch1:		recutils-shared-lib-calls-exit.patch
+
+BuildRequires:	gettext
+BuildRequires:	emacs-nox
+BuildRequires:	chrpath
+Requires:	emacs(bin) >= %{_emacs_version}
+Requires(post): info
+Requires(preun): info
+Requires(post):	/sbin/ldconfig
+Requires(postun):	/sbin/ldconfig
+
+%description
+Recutils is a set of tools and libraries to access human-editable,
+text-based databases called recfiles. The data is stored as a sequence
+of records, each record containing an arbitrary number of named
+fields.
+
+%package devel
+Summary:	Libraries and header files for recutils
+Group:		Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+
+%description devel
+Libraries and header files for recutils
+
+
+%prep
+%setup -q
+%patch0 -p1 -b .recfix-size-lp64
+%patch1 -p1 -b .shared-lib-calls-exit
+
+
+%build
+%configure --disable-static --disable-rpath
+make %{?_smp_mflags}
+%{_emacs_bytecompile} etc/rec-mode.el
+
+
+%check
+make check
+
+
+%install
+make install DESTDIR=%{buildroot} INSTALL="install -p"
+
+# install Emacs mode
+install -dm 755 %{buildroot}%{_emacs_sitelispdir}
+install -pm 644 etc/rec-mode.el* %{buildroot}%{_emacs_sitelispdir}
+# by default, the Emacs mode is installed under datadir.
+rm -f %{buildroot}%{_datadir}/rec-mode.el
+
+# install startup file for the Emacs mode installed above
+install -dm 755 %{buildroot}/%{_emacs_sitestartdir}/
+install -pm 644 %{SOURCE1} %{buildroot}/%{_emacs_sitestartdir}/
+
+rm -f %{buildroot}%{_infodir}/dir
+rm -f %{buildroot}%{_libdir}/*.la
+
+chrpath --delete %{buildroot}%{_bindir}/*
+
+%find_lang %{name}
+
+
+%post
+/sbin/ldconfig
+/sbin/install-info %{_infodir}/%{name}.info %{_infodir}/dir || :
+
+
+%preun
+if [ $1 = 0 ] ; then
+  /sbin/install-info --delete %{_infodir}/%{name}.info %{_infodir}/dir || :
+fi
+
+
+%postun -p /sbin/ldconfig
+
+
+%files -f %{name}.lang
+%defattr(-,root,root,-)
+%doc AUTHORS COPYING ChangeLog NEWS README TODO
+%{_libdir}/*.so.*
+%{_bindir}/*
+%{_mandir}/man1/*
+%{_datadir}/recutils
+%{_infodir}/*.info*
+%{_emacs_sitelispdir}/*.el*
+%{_emacs_sitestartdir}/*.el
+
+%files devel
+%defattr(-,root,root,-)
+%{_includedir}/rec.h
+%{_libdir}/*.so
+
+
+%changelog
+* Tue Oct 18 2011 Daiki Ueno <dueno at redhat.com> - 1.3-4
+- add recutils-shared-lib-calls-exit.patch
+- merge -libs subpackage into the base package
+
+* Tue Oct 18 2011 Daiki Ueno <dueno at redhat.com> - 1.3-3
+- use chrpath instead of patching libtool, so that the programs used
+  in %%check can find librec.so
+
+* Tue May 17 2011 Daiki Ueno <dueno at redhat.com> - 1.3-2
+- run test suite when building
+
+* Thu May 12 2011 Daiki Ueno <dueno at redhat.com> - 1.3-1
+- initial packaging for Fedora
+
diff --git a/sources b/sources
index e69de29..8b27217 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+243d46f191cbbf2be3fd72a86234cd1c  recutils-1.3.tar.gz


More information about the scm-commits mailing list