[packages/SoQt] - added pc patch (removes junk from .pc file) - finished packaging

qboosh qboosh at pld-linux.org
Wed Nov 5 21:32:02 CET 2014

commit bc4d83435fa2f14267597b05f378c1f189b221ab
Author: Jakub Bogusz <qboosh at pld-linux.org>
Date:   Wed Nov 5 21:32:18 2014 +0100

    - added pc patch (removes junk from .pc file)
    - finished packaging

 SoQt-pc.patch |  16 +++++++
 SoQt.spec     | 148 +++++++++++++++++++++++++++-------------------------------
 2 files changed, 86 insertions(+), 78 deletions(-)
diff --git a/SoQt.spec b/SoQt.spec
index 7790d3b..1cdfc3e 100644
--- a/SoQt.spec
+++ b/SoQt.spec
@@ -1,127 +1,119 @@
-Summary:	Toolkit for multiplatform development of 2D user interfaces
-Summary(pl.UTF-8):	Wieloplatformowe narzędzia do rozwoju interfejsów urzytkownika 2D.
+# Conditional build:
+%bcond_without	static_libs	# static library
+Summary:	Qt GUI component toolkit library for Coin
+Summary(pl.UTF-8):	Biblioteka komponentu graficznego interfejsu Qt dla biblioteki Coin
 Name:		SoQt
 Version:	1.5.0
-Release:	0.1
-License:	GPL
+Release:	1
+License:	GPL v2 or Coin PEL
 Group:		X11/Libraries
-# http://ftp.coin3d.org/coin/src/all/SoQt-1.5.0.tar.gz
-Source0:	http://ftp.coin3d.org/coin/src/all/%{name}-%{version}.tar.gz
+Source0:	https://bitbucket.org/Coin3D/coin/downloads/%{name}-%{version}.tar.gz
 # Source0-md5:	9f1e582373d66f556b1db113a93ac68e
+Patch0:		%{name}-pc.patch
 URL:		http://www.coin3d.org/lib/soqt/
 BuildRequires:	Coin-devel
-#BuildRequires:	autoconf
-BuildRequires:	automake
-#BuildRequires:	intltool
-#BuildRequires:	libtool
-#Requires(postun):	-
-#Requires(pre,post):	-
-#Requires(preun):	-
-#Requires:	-
-#Provides:	-
-#Provides:	group(foo)
-#Provides:	user(foo)
-#Obsoletes:	-
-#Conflicts:	-
-#BuildArch:	noarch
-#ExclusiveArch:	%{ix86}
+BuildRequires:	OpenGL-GLU-devel
+BuildRequires:	OpenGL-GLX-devel
+BuildRequires:	QtCore-devel >= 4
+BuildRequires:	QtGui-devel >= 4
+BuildRequires:	QtOpenGL-devel >= 4
+BuildRequires:	libstdc++-devel
+BuildRequires:	sed >= 4.0
+BuildRequires:	pkgconfig
+BuildRequires:	qt4-build >= 4
+BuildRequires:	xorg-lib-libX11-devel
+BuildRequires:	xorg-lib-libXext-devel
+BuildRequires:	xorg-lib-libXmu-devel
 BuildRoot:	%{tmpdir}/%{name}-%{version}-root-%(id -u -n)
-# HAVE_GLX detection is broken in autocrap
-%define specflags -DHAVE_GLX
-Library which provides the glue between Systems in Motion's Coin
-high-level 3D visualization library and Troll Tech's Qt 2D user
-interface library
+SoQt is a Qt GUI component toolkit library for Coin. It is also
+compatible with SGI and TGS Open Inventor, and the API is based on the
+API of the InventorXt GUI component toolkit.
 %description -l pl.UTF-8
-Biblioteka łącząca bibliotekę 3D wysokiego poziomu Coin z interfejsem
+SoQt to biblioteka toolkitu komponentu graficznego interfejsu
+użytkownika (GUI) Qt dla biblioteki Coin. Jest zgodna także z
+biblioteką SGI i TGS Open Inventor, a API jest oparte na API toolkitu
+komponentu graficznego interfejsu użytkownika InventorXt.
 %package devel
-Summary:	Header files for ... library
-Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki ...
-Group:		Development/Libraries
+Summary:	Header files for SoQt library
+Summary(pl.UTF-8):	Pliki nagłówkowe biblioteki SoQt
+Group:		X11/Development/Libraries
 Requires:	%{name} = %{version}-%{release}
+Requires:	Coin-devel
+Requires:	QtCore-devel >= 4
+Requires:	OpenGL-GLX-devel
 %description devel
 Header files for SoQt library.
 %description devel -l pl.UTF-8
-Pliki nagłówkowe biblioteki SoQt
+Pliki nagłówkowe biblioteki SoQt.
+%package static
+Summary:	Static SoQt library
+Summary(pl.UTF-8):	Statyczna biblioteka SoQt
+Group:		X11/Development/Libraries
+Requires:	%{name} = %{version}-%{release}
+%description static
+Static SoQt library.
+%description static -l pl.UTF-8
+Statyczna biblioteka SoQt.
 %setup -q
-#%setup -q -c -T
-#%setup -q -n %{name}
-#%setup -q -n %{name}-%{version}.orig -a 1
-#%patch0 -p1
-# undos the source
-#find '(' -name '*.php' -o -name '*.inc' ')' -print0 | xargs -0 %{__sed} -i -e 's,\r$,,'
+%patch0 -p1
-# remove CVS control files
-#find -name CVS -print0 | xargs -0 rm -rf
+# -DHAVE_GLX is not passed properly from configure
+CXXFLAGS="%{rpmcxxflags} -DHAVE_GLX"
+%configure \
+	%{?with_static_libs:--enable-static}
-# you'll need this if you cp -a complete dir in source
-# cleanup backups after patching
-find '(' -name '*~' -o -name '*.orig' ')' -print0 | xargs -0 -r -l512 rm -f
+# GL is missing; cannot rebuild auto* because of missing m4 files
+%{__sed} -i -e '/^LIBS =/s/$/ -lGL/' src/Inventor/Qt/Makefile
-# if ac/am/* rebuilding is necessary, do it in this order and add
-# appropriate BuildRequires
-# if not running libtool or automake, but config.sub is too old:
-#cp -f /usr/share/automake/config.sub .
-%{__make} \
-  LIBS="-lGL -lCoin -lQtGui -lQtCore -lQtOpenGL"
-#%{__make} \
-#	CFLAGS="%{rpmcflags}" \
-#	LDFLAGS="%{rpmldflags}"
-# create directories if necessary
-#install -d $RPM_BUILD_ROOT
-#install -d $RPM_BUILD_ROOT%{_examplesdir}/%{name}-%{version}
 %{__make} install \
+# obsoleted by pkg-config
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libSoQt.la
 %post	-p /sbin/ldconfig
 %postun	-p /sbin/ldconfig
 %attr(755,root,root) %{_bindir}/soqt-config
 %attr(755,root,root) %{_libdir}/libSoQt.so.*.*.*
-# %{_datadir}/%{name}
+%attr(755,root,root) %ghost %{_libdir}/libSoQt.so.20
 %files devel
-# %doc devel-doc/*
+%attr(755,root,root) %{_libdir}/libSoQt.so
+%if %{with static_libs}
+%files static
diff --git a/SoQt-pc.patch b/SoQt-pc.patch
new file mode 100644
index 0000000..d3afcf8
--- /dev/null
+++ b/SoQt-pc.patch
@@ -0,0 +1,16 @@
+--- SoQt-1.5.0/SoQt.pc.in.orig	2010-03-02 23:57:41.000000000 +0100
++++ SoQt-1.5.0/SoQt.pc.in	2014-11-05 21:11:21.861846303 +0100
+@@ -8,10 +8,10 @@
+ Name: SoQt
+ Description: a Qt Gui-toolkit binding for Coin
+ Version: @SOQT_VERSION@
+-Requires: Coin
++Requires: Coin QtCore
+ Conflicts:
++Libs: -L${libdir}
++Cflags: -I${includedir}
+ soqt_host=@host@
+ compiler=@COIN_COMPILER@

---- gitweb:


More information about the pld-cvs-commit mailing list