So I've been trying to package VDrift
per user request, which has ended up sidetracking me with updating compilers, libraries, and devel packages just to get VDrift to compile. It was suggested on the VDrift forums that I needed to update my glew libs/headers. Since the version of glew in the repos is 1.5.1, and a cursory glance at the changelogs up to the latest stable version(1.5.5), all seem to indicate that may be true.
So I have updated glew from 1.5.1 to 1.5.5. Packaging glew(which you can see from the .spec file at the bottom of this post) also creates
libglew1.5-1.5.5-1pclos2010.i586.rpm and
libglew-devel-1.5.5-1pclos2010.i586.rpm.
Both
glew-1.5.5-1pclos2010.i586.rpm and
libglew1.5-1.5.5-1pclos2010.i586.rpm install fine. However, when I go to install
libglew-devel-1.5.5-1pclos2010.i586.rpm(with right-click >> Install RPM via apt-get) I get the following output:
Reading Package Lists... Done
Building Dependency Tree... Done
Selecting libglew-devel for '/home/chomp/src/rpm/RPMS/i586/libglew-devel-1.5.5-1pclos2010.i586.rpm'
Some packages could not be installed. This may mean that you have
requested an impossible situation or that some of the repositories
in use are in an inconsistent state at the moment.
Since you only requested a single operation it is extremely likely that
the package is simply not installable and a bug report against
that package should be filed.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libglew-devel: Depends: devel(libGLcore) but it is not installable
Depends: devel(libnvidia-tls) but it is not installable
E: Broken packagesAt this point things are getting too complicated for me, so I need help. I can't find libGLcore or libnividia-tls in the repos, nor can I determine if they are packaged under different names. Some research on Google reveals that trying to even wrap my head around what I would need to package/update/change to obtain these dependencies is beyond my current skill set. So, my questions:
1) How do/can I resolve the dependency issue with libGLcore and libnvidia-tls?
2) If the above question is solvable, what(if any) changes would I need to make to the .spec file?
3) When packaging glew 1.5.5 I got an "installed but unpackaged" output for
glew.pc. In the .spec file I placed
glew.pc under
%files -n %{develname}. Is this the correct place to put this?
Thanks in advance. Here's my .spec file:
%define major 1.5
%define libname %mklibname %{name} %{major}
%define develname %mklibname %{name} -d
%define _requires_exceptions devel(/lib/libNoVersion)
Summary: The OpenGL Extension Wrangler Library
Name: glew
Version: 1.5.5
Release: %mkrel 1
Group: Development/C
License: BSD
URL: http://glew.sourceforge.net
Source0: %{name}-%{version}.tgz
BuildRequires: libxorg-x11-devel
BuildRequires: libmesaglu1-devel
BuildRequires: file
BuildRoot: %{_tmppath}/%{name}-%{version}-buildroot
%description
The goal of the OpenGL Extension Wrangler Library (GLEW) is to assist C/C++
OpenGL developers with two tedious tasks: initializing and using extensions
and writing portable applications. GLEW provides an efficient run-time
mechanism to determine whether a certain extension is supported by the
driver or not. OpenGL core and extension functionality is exposed via a
single header file. GLEW currently supports a variety of platforms and
operating systems, including Windows, Linux, Darwin, Irix, and Solaris.
%package -n %{libname}
Summary: GLEW library
Group: System/Libraries
%description -n %{libname}
The goal of the OpenGL Extension Wrangler Library (GLEW) is to assist C/C++
OpenGL developers with two tedious tasks: initializing and using extensions
and writing portable applications. GLEW provides an efficient run-time
mechanism to determine whether a certain extension is supported by the
driver or not. OpenGL core and extension functionality is exposed via a
single header file. GLEW currently supports a variety of platforms and
operating systems, including Windows, Linux, Darwin, Irix, and Solaris.
%package -n %{develname}
Summary: Development files for using the %{name} library
Group: Development/C
Requires: %{libname} = %{version}-%{release}
Provides: %{name}-devel = %{version}-%{release}
Provides: lib%{name}-devel = %{version}-%{release}
Obsoletes: %mklibname %{name} 1.3 -d
Provides: %mklibname %{name} 1.3 -d
%description -n %{develname}
Development files for using the %{name} library.
%prep
%setup -q
# strip away annoying ^M
find . -type f|xargs file|grep 'CRLF'|cut -d: -f1|xargs perl -p -i -e 's/\r//'
find . -type f|xargs file|grep 'text'|cut -d: -f1|xargs perl -p -i -e 's/\r//'
perl -pi -e "s#-shared -soname#-shared -lc -soname#g" config/Makefile.linux
#fix txt/doc files permissions
chmod 0755 doc
chmod 0644 doc/* README.txt
%build
%make CFLAGS.EXTRA="%{optflags} -fPIC"
%install
rm -rf %{buildroot}
%makeinstall_std BINDIR=%{buildroot}%{_bindir} LIBDIR=%{buildroot}%{_libdir} INCDIR=%{buildroot}%{_includedir}/GL
%post -n %{libname} -p /sbin/ldconfig
%postun -n %{libname} -p /sbin/ldconfig
%clean
rm -rf %{buildroot}
%files
%defattr(-,root,root)
%doc README.txt doc
%{_bindir}/glewinfo
%{_bindir}/visualinfo
%files -n %{libname}
%defattr(-,root,root)
%{_libdir}/libGLEW.so.%{major}*
%files -n %{develname}
%defattr(-,root,root)
%{_includedir}/GL/*.h
%{_libdir}/libGLEW.a
%{_libdir}/libGLEW.so
%{_libdir}/pkgconfig/glew.pc
%changelog
* Thu Jul 22 2010 Chomp <chomptheman@gmail.com> 1.5.5-1pclos2010
- update
- dropped p0, fixed upstream since 1.5.2
- update build requirements
- added fix for txt/doc file permissions
* Sun Aug 16 2009 Texstar <texstar@gmail.com> 1.5.1-1pclos2009
- update