OBS User unknown 2007-07-26 23:55:20 +00:00 committed by Git OBS Bridge
commit 74b77fe65d
8 changed files with 732 additions and 0 deletions

23
.gitattributes vendored Normal file
View File

@ -0,0 +1,23 @@
## Default LFS
*.7z filter=lfs diff=lfs merge=lfs -text
*.bsp filter=lfs diff=lfs merge=lfs -text
*.bz2 filter=lfs diff=lfs merge=lfs -text
*.gem filter=lfs diff=lfs merge=lfs -text
*.gz filter=lfs diff=lfs merge=lfs -text
*.jar filter=lfs diff=lfs merge=lfs -text
*.lz filter=lfs diff=lfs merge=lfs -text
*.lzma filter=lfs diff=lfs merge=lfs -text
*.obscpio filter=lfs diff=lfs merge=lfs -text
*.oxt filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.rpm filter=lfs diff=lfs merge=lfs -text
*.tbz filter=lfs diff=lfs merge=lfs -text
*.tbz2 filter=lfs diff=lfs merge=lfs -text
*.tgz filter=lfs diff=lfs merge=lfs -text
*.ttf filter=lfs diff=lfs merge=lfs -text
*.txz filter=lfs diff=lfs merge=lfs -text
*.whl filter=lfs diff=lfs merge=lfs -text
*.xz filter=lfs diff=lfs merge=lfs -text
*.zip filter=lfs diff=lfs merge=lfs -text
*.zst filter=lfs diff=lfs merge=lfs -text

1
.gitignore vendored Normal file
View File

@ -0,0 +1 @@
.osc

3
libgtop-2.19.4.tar.bz2 Normal file
View File

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:71cb75d66c360f4ad480474fd515850ed3f38aa6fda5556341db2e0164d4b869
size 761096

View File

@ -0,0 +1,26 @@
Index: sysdeps/linux/procmem.c
===================================================================
RCS file: /cvs/gnome/libgtop/sysdeps/linux/procmem.c,v
retrieving revision 1.27
diff -u -p -u -r1.27 procmem.c
--- sysdeps/linux/procmem.c 22 Jul 2005 19:20:39 -0000 1.27
+++ sysdeps/linux/procmem.c 28 Mar 2006 17:10:25 -0000
@@ -75,13 +75,16 @@ glibtop_get_proc_mem_s (glibtop *server,
return;
buf->size = strtoull (buffer, &p, 0);
- buf->resident = strtoull (p, &p, 0);
+
+ p = skip_token (p); /* RSS again */
+
buf->share = strtoull (p, &p, 0);
buf->size *= pagesize;
- buf->resident *= pagesize;
buf->share *= pagesize;
buf->rss *= pagesize;
+
+ buf->resident = buf->rss - buf->share;
buf->flags |= _glibtop_sysdeps_proc_mem_statm;
}

330
libgtop.changes Normal file
View File

@ -0,0 +1,330 @@
-------------------------------------------------------------------
Tue Jul 17 13:30:16 CEST 2007 - sbrabec@suse.cz
- Fixed shared library packaging.
- Added script to update library package names.
-------------------------------------------------------------------
Mon Jul 9 22:04:13 CEST 2007 - maw@suse.de
- Rename the package to libgtop-2_0-7
- Update to version 2.19.4
- Minor API change - get_proclist returns pit_t instead of unsigned
- Portability fixes.
-------------------------------------------------------------------
Mon Apr 2 13:13:15 CDT 2007 - maw@suse.de
- Update to version 2.14.8
- Support for FreeBSD
- Fixed up signal handling.
-------------------------------------------------------------------
Mon Mar 26 13:11:22 CEST 2007 - rguenther@suse.de
- Add gdbm-devel BuildRequires.
-------------------------------------------------------------------
Tue Feb 27 09:50:37 CST 2007 - maw@suse.de
- Create a -doc subpackage (#248813).
-------------------------------------------------------------------
Mon Feb 19 15:04:20 CST 2007 - maw@suse.de
- Update to version 2.14.7
- Remove libgtop-buffer-overflow.patch which is now upstream
- Package gtk-doc generated docs in the -devel subpackage.
-------------------------------------------------------------------
Tue Feb 13 11:50:51 CET 2007 - sbrabec@suse.cz
- Do not build unusable static libraries (#238552#c17).
-------------------------------------------------------------------
Fri Jan 19 12:30:57 CST 2007 - maw@suse.de
- Add libgtop-buffer-overflow.patch (#235086 and CVE-2007-0235).
-------------------------------------------------------------------
Mon Jan 8 18:27:14 CET 2007 - sbrabec@suse.cz
- Spec file cleanup.
-------------------------------------------------------------------
Mon Jan 8 00:10:45 CET 2007 - ro@suse.de
- GNOME moved to /usr
-------------------------------------------------------------------
Tue Oct 3 18:39:13 CEST 2006 - jhargadon@suse.de
- update to version 2.14.4
- Fixed linux maps/smaps parsing on 64bit kernel
- Fixed build with --as-needed
- Added missing G_BEGIN_DECLS/G_END_DECLS
-------------------------------------------------------------------
Tue Aug 15 22:46:36 CEST 2006 - jhargadon@suse.de
- update to version 2.14.2
- Updated solaris support
- interface addition to handle wireless interfaces.
-------------------------------------------------------------------
Tue Aug 15 17:17:28 CEST 2006 - sbrabec@suse.cz
- Call ldconfig (#198912).
-------------------------------------------------------------------
Tue Aug 1 23:50:19 CEST 2006 - gekker@suse.de
- Update to version 2.14.1
* Updated translations.
* Fixed NetBSD port (Julio M. Merino Vidal <jmmv@NetBSD.org>).
* Fixed proc_state documentation.
* Updated mountlist ignore list.
* fix get_procmap for linux < 2.6.14.
* Fixed libtool versioning (James Henstridge)
* fixed proclist
* implemented server->real_ncpu
* Requires automake-1.9 (James Henstridge)
* Supports up to 32 CPU
* Supports Linux smaps
* fixed SMP detection
-------------------------------------------------------------------
Tue Mar 28 19:32:59 CEST 2006 - joeshaw@suse.de
- Add a patch which makes the "Resident" field RSS - Shared,
rather than just being a duplicate of RSS. Fixes half of
bnc #157022. Submitted upstream as bgo #336376.
- Remove an unused, commented-out patch
-------------------------------------------------------------------
Sat Feb 4 15:11:24 CET 2006 - aj@suse.de
- Reduce BuildRequires.
-------------------------------------------------------------------
Thu Jan 26 15:51:26 CET 2006 - sbrabec@suse.cz
- Added %install_info_prereq.
-------------------------------------------------------------------
Wed Jan 25 21:32:24 CET 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
-------------------------------------------------------------------
Wed Nov 30 23:28:41 CET 2005 - gekker@suse.de
- Update to version 2.12.2
-------------------------------------------------------------------
Mon Sep 5 21:27:03 CEST 2005 - gekker@suse.de
- Update to version 2.12.0 (GNOME 2.12)
-------------------------------------------------------------------
Tue Aug 23 18:11:13 CEST 2005 - gekker@suse.de
- Update to version 2.11.92
-------------------------------------------------------------------
Mon Aug 8 13:53:22 CEST 2005 - rodrigo@suse.de
- Updated to 2.11.91
-------------------------------------------------------------------
Tue Aug 2 22:06:49 CEST 2005 - gekker@suse.de
- Update to version 2.11.90
- Fixup devel requirements
-------------------------------------------------------------------
Fri Jul 22 23:12:30 CEST 2005 - gekker@suse.de
- Update to version 2.11.2
-------------------------------------------------------------------
Wed Jun 22 02:24:41 CEST 2005 - gekker@suse.de
- Update to version 2.11.0
-------------------------------------------------------------------
Fri Jun 17 12:55:23 CEST 2005 - sbrabec@suse.cz
- Build with libXau on x86_64 (#91187).
-------------------------------------------------------------------
Wed Jun 1 18:57:26 CEST 2005 - sbrabec@suse.cz
- Fixed devel requirements.
-------------------------------------------------------------------
Thu Mar 10 00:41:13 CET 2005 - gekker@suse.de
- Update to version 2.10.0 (GNOME 2.10).
-------------------------------------------------------------------
Fri Mar 4 00:16:39 CET 2005 - gekker@suse.de
- Update to version 2.9.92
-------------------------------------------------------------------
Fri Feb 11 05:39:03 CET 2005 - gekker@suse.de
- Update to version 2.9.91
-------------------------------------------------------------------
Thu Jan 27 15:28:01 CET 2005 - hhetter@suse.de
- updated to version 2.9.90
-------------------------------------------------------------------
Mon Jan 24 11:44:26 CET 2005 - ro@suse.de
- fix build on x86_64 working around non-fPIC libXau
-------------------------------------------------------------------
Fri Jan 21 23:05:51 CET 2005 - gekker@suse.de
- Update to version 2.9.4
-------------------------------------------------------------------
Tue Jan 4 16:47:21 CET 2005 - gekker@suse.de
- Update to version 2.9.3
-------------------------------------------------------------------
Tue Dec 21 18:22:52 CET 2004 - gekker@suse.de
- Update to version 2.9.0
-------------------------------------------------------------------
Tue Nov 23 16:00:20 CET 2004 - ro@suse.de
- fix name of info file in postinstall
-------------------------------------------------------------------
Mon Oct 25 12:40:22 CEST 2004 - ro@suse.de
- locale rename: no -> nb
-------------------------------------------------------------------
Thu Apr 29 16:21:36 CEST 2004 - hhetter@suse.de
- updated to version 2.5.2 [GNOME2.6]
-------------------------------------------------------------------
Mon Mar 22 17:42:22 CET 2004 - sbrabec@suse.cz
- Provide and obsolete libgtop2-devel.
-------------------------------------------------------------------
Tue Mar 16 10:08:06 CET 2004 - sbrabec@suse.cz
- FHS 2.3 fix (mandir, infodir, #35821).
-------------------------------------------------------------------
Fri Feb 20 14:13:43 CET 2004 - sbrabec@suse.cz
- Package renamed to libgtop.
-------------------------------------------------------------------
Mon Feb 16 15:15:41 CET 2004 - hhetter@suse.de
- fix filelist
-------------------------------------------------------------------
Mon Feb 9 14:59:01 CET 2004 - hhetter@suse.de
- updated to version 2.0.8 [GNOME2.4.2]
-------------------------------------------------------------------
Thu Nov 6 17:10:51 CET 2003 - schwab@suse.de
- Fix quoting in configure script.
-------------------------------------------------------------------
Tue Sep 09 17:18:03 CEST 2003 - sbrabec@suse.cz
- Updated to version 2.0.5.
-------------------------------------------------------------------
Mon Aug 25 15:03:09 CEST 2003 - sbrabec@suse.cz
- Updated to version 2.0.4.
-------------------------------------------------------------------
Tue Aug 19 13:37:34 CEST 2003 - sbrabec@suse.cz
- Updated to version 2.0.3.
-------------------------------------------------------------------
Mon Jul 14 16:14:29 CEST 2003 - sbrabec@suse.cz
- GNOME prefix change to /opt/gnome.
-------------------------------------------------------------------
Thu Jun 26 12:55:50 CEST 2003 - sbrabec@suse.cz
- Cleaned up neededforbuild.
- Use %find_lang.
-------------------------------------------------------------------
Mon Jun 23 01:51:15 CEST 2003 - ro@suse.de
- added gnome-filesystem to neededforbuild
- added directories to filelist
-------------------------------------------------------------------
Tue May 27 16:02:02 CEST 2003 - sbrabec@suse.cz
- Updated to version 2.0.2.
- Updated neededforbuild.
- Fixed %files.
-------------------------------------------------------------------
Thu Jan 16 10:04:41 CET 2003 - hhetter@suse.de
- updated to version 2.0.1
- adapted automake fix
-------------------------------------------------------------------
Tue Sep 24 14:48:42 CEST 2002 - sbrabec@suse.cz
- Fixed incorrect update to 2.0.0.
-------------------------------------------------------------------
Tue Jun 11 11:49:06 CEST 2002 - hhetter@suse.de
- updated to version 2.0.0
-------------------------------------------------------------------
Tue Jun 4 10:50:12 CEST 2002 - hhetter@suse.de
- update to source frozen version 1.90.2
- fix filelist
-------------------------------------------------------------------
Wed May 15 11:16:46 CEST 2002 - ro@suse.de
- use libdir
-------------------------------------------------------------------
Thu Apr 18 01:54:01 CEST 2002 - ro@suse.de
- fix for automake-1.6
-------------------------------------------------------------------
Thu Jan 17 10:15:15 CET 2002 - hhetter@suse.de
- prefixed to /opt/gnome2
-------------------------------------------------------------------
Mon Jan 14 17:11:01 CET 2002 - hhetter@suse.de
- initial SuSE package for GNOME 2.0 platform

315
libgtop.spec Normal file
View File

@ -0,0 +1,315 @@
#
# spec file for package libgtop (Version 2.19.4)
#
# Copyright (c) 2007 SUSE LINUX Products GmbH, Nuernberg, Germany.
# This file and all modifications and additions to the pristine
# package are under the same license as the package itself.
#
# Please submit bugfixes or comments via http://bugs.opensuse.org/
#
Name: libgtop
BuildRequires: gdbm-devel glib2-devel gtk-doc intltool licenses popt-devel xorg-x11-devel
License: GPL v2 or later
Group: Development/Libraries/GNOME
Version: 2.19.4
Release: 1
# WARNING: After changing versions please call Re or rpmbuild to auto-update spec file:
#%(sh %{_sourcedir}/%{name}_spec-update.sh %{_sourcedir} %{name} libgtop-2_0)
%define libgtop-2_0_name 7
Summary: LibGTop Library
Source: ftp://ftp.gnome.org/pub/GNOME/stable/sources/libgtop/2.19/%{name}-%{version}.tar.bz2
Source1: %{name}_spec-update.sh
Patch: libgtop-resident-field-fix.patch
Requires: libgtop-2_0-7 licenses
BuildRoot: %{_tmppath}/%{name}-%{version}-build
%description
A library that fetches information about the running system, such as
CPU and memory usage and active processes.
On Linux systems, this information is taken directly from the /proc
file system. On other systems, a server is used to read information
from /dev/kmem.
Authors:
--------
Martin Baulig (martin@home-of-linux.org)
Drazen Kacar (dave@srce.hr)
%package -n libgtop-2_0-7
Summary: LibGTop Library
Group: Development/Libraries/GNOME
# Require translation package (%{name}) not older than the library:
Requires: %{name} >= %{version}
%description -n libgtop-2_0-7
A library that fetches information about the running system, such as
CPU and memory usage and active processes.
On Linux systems, this information is taken directly from the /proc
file system. On other systems, a server is used to read information
from /dev/kmem.
Authors:
--------
Martin Baulig (martin@home-of-linux.org)
Drazen Kacar (dave@srce.hr)
%package devel
Summary: Include Files and Libraries mandatory for Development.
Group: Development/Libraries/GNOME
Requires: %{name} = %{version} glib2-devel gdbm-devel xorg-x11-devel
PreReq: %install_info_prereq
%description devel
This package contains all necessary include files and libraries needed
to develop applications that require these.
Authors:
--------
Martin Baulig (martin@home-of-linux.org)
Drazen Kacar (dave@srce.hr)
%package doc
Summary: LibGTop Library
Group: Development/Libraries/GNOME
Requires: %{name} = %{version}
%description doc
A library that fetches information about the running system, such as
CPU and memory usage and active processes.
On Linux systems, this information is taken directly from the /proc
file system. On other systems, a server is used to read information
from /dev/kmem.
Authors:
--------
Martin Baulig (martin@home-of-linux.org)
Drazen Kacar (dave@srce.hr)
%prep
%setup -q
%patch
# rpmlint note: libgtop has a separate translation for both Bengali and Bengali India
%build
autoreconf -f -i
%configure\
--disable-static
make %{?jobs:-j%jobs}
%install
%makeinstall
%find_lang %{name}-2.0
LIBNAME="$(echo $RPM_BUILD_ROOT%{_libdir}/%{name}-*.so.? | sed 's/.*\///;s/\.so\./-/;s/\./_/')"
if test "$LIBNAME" != libgtop-2_0-7 ; then
echo "Library version does not match package name. It should be $LIBNAME."
exit 1
fi
for FILE in COPYING copyright.txt ; do
MD5SUM=$(md5sum $FILE | sed 's/ .*//')
if test -f /usr/share/doc/licenses/md5/$MD5SUM ; then
ln -sf /usr/share/doc/licenses/md5/$MD5SUM $FILE
fi
done
%clean
rm -rf $RPM_BUILD_ROOT
%post -n libgtop-2_0-7 -p /sbin/ldconfig
%postun -n libgtop-2_0-7 -p /sbin/ldconfig
%post doc
%install_info --info-dir=%{_datadir}/info %{_datadir}/info/%{name}2.info.gz
%postun doc
%install_info_delete --info-dir=%{_datadir}/info %{_datadir}/info/%{name}2.info.gz
%files -f %{name}-2.0.lang
%defattr(-, root, root)
# TODO is empty
%doc AUTHORS COPYING NEWS README copyright.txt
%files -n libgtop-2_0-7
%defattr(-, root, root)
%{_libdir}/*.so.*
%files devel
%defattr(-, root, root)
%{_includedir}/libgtop-2.0
%{_libdir}/*.so
%{_libdir}/*.*a
%{_libdir}/pkgconfig/*.pc
%files doc
%defattr(-, root, root)
%dir %{_datadir}/gtk-doc/html/libgtop
%{_datadir}/gtk-doc/html/libgtop/*
%doc %{_infodir}/*.info*
%changelog
* Tue Jul 17 2007 - sbrabec@suse.cz
- Fixed shared library packaging.
- Added script to update library package names.
* Mon Jul 09 2007 - maw@suse.de
- Rename the package to libgtop-2_0-7
- Update to version 2.19.4
- Minor API change - get_proclist returns pit_t instead of unsigned
- Portability fixes.
* Mon Apr 02 2007 - maw@suse.de
- Update to version 2.14.8
- Support for FreeBSD
- Fixed up signal handling.
* Mon Mar 26 2007 - rguenther@suse.de
- Add gdbm-devel BuildRequires.
* Tue Feb 27 2007 - maw@suse.de
- Create a -doc subpackage (#248813).
* Mon Feb 19 2007 - maw@suse.de
- Update to version 2.14.7
- Remove libgtop-buffer-overflow.patch which is now upstream
- Package gtk-doc generated docs in the -devel subpackage.
* Tue Feb 13 2007 - sbrabec@suse.cz
- Do not build unusable static libraries (#238552#c17).
* Fri Jan 19 2007 - maw@suse.de
- Add libgtop-buffer-overflow.patch (#235086 and CVE-2007-0235).
* Mon Jan 08 2007 - sbrabec@suse.cz
- Spec file cleanup.
* Mon Jan 08 2007 - ro@suse.de
- GNOME moved to /usr
* Tue Oct 03 2006 - jhargadon@suse.de
- update to version 2.14.4
- Fixed linux maps/smaps parsing on 64bit kernel
- Fixed build with --as-needed
- Added missing G_BEGIN_DECLS/G_END_DECLS
* Tue Aug 15 2006 - jhargadon@suse.de
- update to version 2.14.2
- Updated solaris support
- interface addition to handle wireless interfaces.
* Tue Aug 15 2006 - sbrabec@suse.cz
- Call ldconfig (#198912).
* Tue Aug 01 2006 - gekker@suse.de
- Update to version 2.14.1
* Updated translations.
* Fixed NetBSD port (Julio M. Merino Vidal <jmmv@NetBSD.org>).
* Fixed proc_state documentation.
* Updated mountlist ignore list.
* fix get_procmap for linux < 2.6.14.
* Fixed libtool versioning (James Henstridge)
* fixed proclist
* implemented server->real_ncpu
* Requires automake-1.9 (James Henstridge)
* Supports up to 32 CPU
* Supports Linux smaps
* fixed SMP detection
* Tue Mar 28 2006 - joeshaw@suse.de
- Add a patch which makes the "Resident" field RSS - Shared,
rather than just being a duplicate of RSS. Fixes half of
bnc #157022. Submitted upstream as bgo #336376.
- Remove an unused, commented-out patch
* Sat Feb 04 2006 - aj@suse.de
- Reduce BuildRequires.
* Thu Jan 26 2006 - sbrabec@suse.cz
- Added %%install_info_prereq.
* Wed Jan 25 2006 - mls@suse.de
- converted neededforbuild to BuildRequires
* Wed Nov 30 2005 - gekker@suse.de
- Update to version 2.12.2
* Mon Sep 05 2005 - gekker@suse.de
- Update to version 2.12.0 (GNOME 2.12)
* Tue Aug 23 2005 - gekker@suse.de
- Update to version 2.11.92
* Mon Aug 08 2005 - rodrigo@suse.de
- Updated to 2.11.91
* Tue Aug 02 2005 - gekker@suse.de
- Update to version 2.11.90
- Fixup devel requirements
* Fri Jul 22 2005 - gekker@suse.de
- Update to version 2.11.2
* Wed Jun 22 2005 - gekker@suse.de
- Update to version 2.11.0
* Fri Jun 17 2005 - sbrabec@suse.cz
- Build with libXau on x86_64 (#91187).
* Wed Jun 01 2005 - sbrabec@suse.cz
- Fixed devel requirements.
* Thu Mar 10 2005 - gekker@suse.de
- Update to version 2.10.0 (GNOME 2.10).
* Fri Mar 04 2005 - gekker@suse.de
- Update to version 2.9.92
* Fri Feb 11 2005 - gekker@suse.de
- Update to version 2.9.91
* Thu Jan 27 2005 - hhetter@suse.de
- updated to version 2.9.90
* Mon Jan 24 2005 - ro@suse.de
- fix build on x86_64 working around non-fPIC libXau
* Fri Jan 21 2005 - gekker@suse.de
- Update to version 2.9.4
* Tue Jan 04 2005 - gekker@suse.de
- Update to version 2.9.3
* Tue Dec 21 2004 - gekker@suse.de
- Update to version 2.9.0
* Tue Nov 23 2004 - ro@suse.de
- fix name of info file in postinstall
* Mon Oct 25 2004 - ro@suse.de
- locale rename: no -> nb
* Thu Apr 29 2004 - hhetter@suse.de
- updated to version 2.5.2 [GNOME2.6]
* Mon Mar 22 2004 - sbrabec@suse.cz
- Provide and obsolete libgtop2-devel.
* Tue Mar 16 2004 - sbrabec@suse.cz
- FHS 2.3 fix (mandir, infodir, #35821).
* Fri Feb 20 2004 - sbrabec@suse.cz
- Package renamed to libgtop.
* Mon Feb 16 2004 - hhetter@suse.de
- fix filelist
* Mon Feb 09 2004 - hhetter@suse.de
- updated to version 2.0.8 [GNOME2.4.2]
* Thu Nov 06 2003 - schwab@suse.de
- Fix quoting in configure script.
* Tue Sep 09 2003 - sbrabec@suse.cz
- Updated to version 2.0.5.
* Mon Aug 25 2003 - sbrabec@suse.cz
- Updated to version 2.0.4.
* Tue Aug 19 2003 - sbrabec@suse.cz
- Updated to version 2.0.3.
* Mon Jul 14 2003 - sbrabec@suse.cz
- GNOME prefix change to /opt/gnome.
* Thu Jun 26 2003 - sbrabec@suse.cz
- Cleaned up neededforbuild.
- Use %%find_lang.
* Mon Jun 23 2003 - ro@suse.de
- added gnome-filesystem to neededforbuild
- added directories to filelist
* Tue May 27 2003 - sbrabec@suse.cz
- Updated to version 2.0.2.
- Updated neededforbuild.
- Fixed %%files.
* Thu Jan 16 2003 - hhetter@suse.de
- updated to version 2.0.1
- adapted automake fix
* Tue Sep 24 2002 - sbrabec@suse.cz
- Fixed incorrect update to 2.0.0.
* Tue Jun 11 2002 - hhetter@suse.de
- updated to version 2.0.0
* Tue Jun 04 2002 - hhetter@suse.de
- update to source frozen version 1.90.2
- fix filelist
* Wed May 15 2002 - ro@suse.de
- use libdir
* Thu Apr 18 2002 - ro@suse.de
- fix for automake-1.6
* Thu Jan 17 2002 - hhetter@suse.de
- prefixed to /opt/gnome2
* Mon Jan 14 2002 - hhetter@suse.de
- initial SuSE package for GNOME 2.0 platform

34
libgtop_spec-update.sh Normal file
View File

@ -0,0 +1,34 @@
#!/bin/bash
# Autobuild doesn't support package names with macros. This script will update versions in package names.
# Usage: Automatically called from spec file by:
# libwnck_spec-update.sh DIR BASE_NAME libnames...
if ! test -f $1/$2.spec ; then
exit
fi
BASE=$1/$2
shift 2
for PKGNAME in $@ ; do
# Packages with name ending by number needs separator
if test x`echo $PKGNAME | sed "s/.*[0-9]$//"` = x ; then
SEPARATOR=-
else
SEPARATOR=
fi
sed -i "
# Copy ${PKGNAME}_name to hold space
/^%define ${PKGNAME}_name / {
h;
s/^%define ${PKGNAME}_name //;
x;
};
# Update ${PKGNAME}_name everywhere
/$PKGNAME$SEPARATOR[0-9][-_0-9]*/ {
G;
s/$PKGNAME$SEPARATOR[0-9][-_0-9]*\(.*\)\n\(.*\)/$PKGNAME$SEPARATOR\2\1/;
};" $BASE.spec
done

0
ready Normal file
View File