old specfile updated

added norebuilddb patch to fix make install
fixed postun script [release 0.3.14-5mamba;Tue Aug 24 2010]
This commit is contained in:
Silvan Calarco 2024-01-06 05:44:15 +01:00
parent 40bae344bb
commit b6fca0d8d2
5 changed files with 214 additions and 0 deletions

View File

@ -1,2 +1,6 @@
# libscrollkeeper # libscrollkeeper
ScrollKeeper is a cataloging system for documentation on open systems.
It manages documentation metadata (as specified by the Open Source Metadata Framework(OMF)) and provides a simple API to allow help browsers to find, sort, and search the document catalog. It will also be able to communicate with
catalog servers on the Net to search for documents which are not on the local system.

View File

@ -0,0 +1,18 @@
--- scrollkeeper-0.3.11/libs/install.c.validate-warning 2003-08-07 15:36:42.000000000 -0400
+++ scrollkeeper-0.3.11/libs/install.c 2003-08-07 15:37:49.000000000 -0400
@@ -182,6 +182,7 @@
sk_message(outputprefs, SKOUT_DEFAULT, SKOUT_QUIET, "(install)", _("Could not parse ScrollKeeper-OMF DTD: %s\n"), SCROLLKEEPER_OMF_DTD);
return 0;
} else {
+#if 0
xmlValidCtxt cvp;
cvp.userData = (char *) &outputprefs;
cvp.error = (xmlValidityErrorFunc) sk_dtd_validation_message;
@@ -190,6 +191,7 @@
sk_message(outputprefs, SKOUT_DEFAULT, SKOUT_QUIET, "(install)", _("OMF file [%s] does not validate against ScrollKeeper-OMF DTD: %s\n"), omf_name, SCROLLKEEPER_OMF_DTD);
return 0;
}
+#endif
}
xmlFreeDtd(dtd);

View File

@ -0,0 +1,33 @@
--- libs/database.c.orig 2005-03-17 14:11:01.000000000 -0500
+++ libs/database.c 2005-03-17 14:12:56.000000000 -0500
@@ -56,6 +56,7 @@ static int sk_mkdir(char *path, mode_t o
int sk_mkdir_with_parents(char *fullpath, mode_t options, char outputprefs)
{
char path[1024];
+ char path2[1024];
char slash[]="/";
char delim[]="/";
char *token, *pathcopy;
@@ -69,17 +70,18 @@ int sk_mkdir_with_parents(char *fullpath
delim[0]=slash[0];
while(token != NULL) {
if (strlen(path) == 0 || ((strlen(path) == 1) && (path[0] == slash[0]))) {
- sprintf(path, "%s%s", path, token);
+ sprintf(path2, "%s%s", path, token);
} else {
- sprintf(path, "%s/%s", path, token);
+ sprintf(path2, "%s/%s", path, token);
}
- if (stat(path, &buf) == -1) {
- if (sk_mkdir(path, options, outputprefs) != 0) {
+ if (stat(path2, &buf) == -1) {
+ if (sk_mkdir(path2, options, outputprefs) != 0) {
return 1;
}
}
delim[0]=slash[0];
token = strtok (NULL, delim);
+ strncpy (path, path2, sizeof (path));
}
return 0;

View File

@ -0,0 +1,11 @@
--- Makefile.in.orig
+++ Makefile.in
@@ -675,8 +675,6 @@
$(mkinstalldirs) $(DESTDIR)$(localstatedir)/log
PATH="$(PATH):$(DESTDIR)$(bindir)" ; \
echo "`date +\"%b %d %X\"` Installing ScrollKeeper `scrollkeeper-config --version`..." >> $(DESTDIR)$(localstatedir)/log/scrollkeeper.log
- PATH="$(PATH):$(DESTDIR)$(bindir)" ; \
- $(DESTDIR)$(bindir)/scrollkeeper-rebuilddb -q -p $(DESTDIR)$(scrollkeeper_localstate_dir)
# Remove generated files
uninstall-local:

148
libscrollkeeper.spec Normal file
View File

@ -0,0 +1,148 @@
%define majversion %(echo %version | cut -d. -f 1-2)
Name: libscrollkeeper
Version: 0.3.14
Release: 5mamba
Summary: A cataloging system for documentation on open systems
Group: System/Libraries
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://scrollkeeper.sourceforge.net/
Source: http://ftp.gnome.org/pub/GNOME/sources/scrollkeeper/%{majversion}/scrollkeeper-%{version}.tar.bz2
# patches stolen from fedora
Patch0: %{name}-0.3.11-validate-warning.patch
Patch1: %{name}-0.3.14-fix-mkdir-segfault.patch
Patch2: %{name}-0.3.14-norebuilddb.patch
License: LGPL
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: libxml2-devel
BuildRequires: libxslt-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
BuildRequires: libglib-devel
BuildRequires: xml-common
BuildRequires: libxml2-utils
BuildRequires: gettext
BuildRequires: docbook-dtds
BuildRequires: docbook-xsl
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
ScrollKeeper is a cataloging system for documentation on open systems.
It manages documentation metadata (as specified by the Open Source Metadata Framework(OMF)) and provides a simple API to allow help browsers to find, sort, and search the document catalog. It will also be able to communicate with
catalog servers on the Net to search for documents which are not on the local system.
%package devel
Summary: Devel package for libscrollkeeper
Group: Development/Libraries
Requires: %{name} = %{?epoch:%epoch:}%{version}-%{release}
%description devel
ScrollKeeper is a cataloging system for documentation on open systems.
It manages documentation metadata (as specified by the Open Source Metadata Framework(OMF)) and provides a simple API to allow help browsers to find, sort, and search the document catalog.
It will also be able to communicate with catalog servers on the Net to search for documents which are not on the local system.
This package contains static libraries and header files need for development.
%prep
%setup -q -n scrollkeeper-%{version}
%patch0 -p1 -b .validate-warning
%patch1 -p0 -b .fix-mkdir-segfault
%patch2 -p0
%build
%configure \
--enable-shared \
--disable-static
%make
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%makeinstall
%find_lang scrollkeeper
> %{buildroot}%{_localstatedir}/log/scrollkeeper.log
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post
/sbin/ldconfig
if [ $1 = 2 ]; then
echo "`date +"%b %d %X"` Upgrading to ScrollKeeper `scrollkeeper-config --version`..." \
>> %{_localstatedir}/log/scrollkeeper.log
fi
if [ $1 = 1 ]; then
echo "`date +"%b %d %X"` Installing ScrollKeeper `scrollkeeper-config --version`..." >> \
%{_localstatedir}/log/scrollkeeper.log
fi
scrollkeeper-rebuilddb -p %{_localstatedir}/lib/scrollkeeper \
>> %{_localstatedir}/log/scrollkeeper.log 2>&1
# Add OMF DTD to XML catalog
/usr/bin/xmlcatalog --noout --add "rewriteSystem" \
"http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd" \
"%{_datadir}/xml/scrollkeeper/dtds/scrollkeeper-omf.dtd" /etc/xml/catalog
/usr/bin/xmlcatalog --noout --add "rewriteURI" \
"http://scrollkeeper.sourceforge.net/dtds/scrollkeeper-omf-1.0/scrollkeeper-omf.dtd" \
"%{_datadir}/xml/scrollkeeper/dtds/scrollkeeper-omf.dtd" /etc/xml/catalog
exit 0
%postun
if [ $1 = 0 ]; then
/usr/bin/xmlcatalog --noout --del \
"%{_datadir}/xml/scrollkeeper/dtds/scrollkeeper-omf.dtd" /etc/xml/catalog
fi
/sbin/ldconfig
exit 0
%files -f scrollkeeper.lang
%defattr(-,root,root)
%{_bindir}/scrollkeeper-extract
%{_bindir}/scrollkeeper-gen*
%{_bindir}/scrollkeeper-get*
%{_bindir}/scrollkeeper-install
%{_bindir}/scrollkeeper-preinstall
%{_bindir}/scrollkeeper-rebuilddb
%{_bindir}/scrollkeeper-uninstall
%{_bindir}/scrollkeeper-update
%{_libdir}/*.so.*
%{_datadir}/scrollkeeper/
%config(noreplace) %{_sysconfdir}/scrollkeeper.conf
%dir %{_datadir}/omf
%{_datadir}/omf/scrollkeeper
%{_datadir}/xml/scrollkeeper
%{_datadir}/doc/scrollkeeper-%{version}/*
%dir %{_localstatedir}/lib/scrollkeeper/
%ghost %{_localstatedir}/log/scrollkeeper.log
%{_mandir}/man?/*
%doc AUTHORS COPYING* NEWS README TODO
%doc scrollkeeper-spec.txt
%files devel
%defattr(-,root,root)
%{_bindir}/scrollkeeper-config
%{_libdir}/*.la
%{_libdir}/*.so
%changelog
* Tue Aug 24 2010 Silvan Calarco <silvan.calarco@mambasoft.it> 0.3.14-5mamba
- old specfile updated
- added norebuilddb patch to fix make install
- fixed postun script
* Tue Apr 24 2007 Davide Madrisan <davide.madrisan@gmail.com> 0.3.14-4mamba
- removed duplicate scrollkeeper-config binary from the main package
- do not build the static library
* Fri Jan 12 2007 Davide Madrisan <davide.madrisan@qilinux.it> 0.3.14-3qilnx
- rebuild xml catalog when installing/removing/updating the package
* Thu Apr 28 2005 Davide Madrisan <davide.madrisan@qilinux.it> 0.3.14-2qilnx
- rebuilt
* Sun Jul 04 2004 Silvan Calarco <silvan.calarco@qilinux.it> 0.3.14-1qilnx
- first build