rpms/libglfw/F-9 glfw-2.6-dso.patch, NONE, 1.1 libglfw.spec, NONE, 1.1 .cvsignore, 1.1, 1.2 sources, 1.1, 1.2

Lubomir Rintel lkundrak at fedoraproject.org
Thu Jan 8 14:42:19 UTC 2009


Author: lkundrak

Update of /cvs/pkgs/rpms/libglfw/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv15425/F-9

Modified Files:
	.cvsignore sources 
Added Files:
	glfw-2.6-dso.patch libglfw.spec 
Log Message:
Merge to branches

glfw-2.6-dso.patch:

--- NEW FILE glfw-2.6-dso.patch ---
Make only DSO, not a static library
Use SONAME
Make it possible to slecify libdir (lib vs. lib64)
Make it possibel to specify an installation root

Lubomir Rintel <lkundrak at v3.sk>

diff -up glfw/compile.sh.dso glfw/compile.sh
--- glfw/compile.sh.dso	2009-01-08 14:46:02.000000000 +0100
+++ glfw/compile.sh	2009-01-08 14:46:15.000000000 +0100
@@ -594,7 +594,7 @@ echo "$config_script: Creating ""$MKNAME
 cat > "$MKNAME" <<EOF
 prefix=@PREFIX@
 exec_prefix=@PREFIX@
-libdir=@PREFIX@/lib
+libdir=@PREFIX@/@LIB@
 includedir=@PREFIX@/include
 
 Name: GLFW
diff -up glfw/lib/x11/Makefile.x11.in.dso glfw/lib/x11/Makefile.x11.in
--- glfw/lib/x11/Makefile.x11.in.dso	2007-07-01 11:46:46.000000000 +0200
+++ glfw/lib/x11/Makefile.x11.in	2009-01-08 14:44:52.000000000 +0100
@@ -3,12 +3,19 @@
 # Installation prefix (default to /usr/local)
 ##########################################################################
 PREFIX ?= /usr/local
+LIB ?= lib
 
 
 ##########################################################################
-# Default: Build GLFW static library
+# Default: Build GLFW shared library
 ##########################################################################
-default: libglfw.a libglfw.so
+
+# API Version: 2.6
+# We assume API corresponds to ABI for now
+ABI_MAJOR=2.6
+ABI_MINOR=0
+SONAME=libglfw.so.$(ABI_MAJOR)
+default: $(SONAME)
 
 
 ##########################################################################
@@ -20,17 +27,18 @@ SED      = sed
 INSTALL  = install
 ARFLAGS  = -rcs
 
-
 ##########################################################################
 # Install GLFW static library
 ##########################################################################
-install: libglfw.a libglfw.pc
-	$(INSTALL) -d $(PREFIX)/lib
-	$(INSTALL) -c -m 644 libglfw.a $(PREFIX)/lib/libglfw.a
-	$(INSTALL) -d $(PREFIX)/include/GL
-	$(INSTALL) -c -m 644 ../../include/GL/glfw.h $(PREFIX)/include/GL/glfw.h
-	$(INSTALL) -d $(PREFIX)/lib/pkgconfig
-	$(INSTALL) -c -m 644 libglfw.pc $(PREFIX)/lib/pkgconfig/libglfw.pc
+install: $(SONAME) libglfw.pc
+	$(INSTALL) -d $(DESTDIR)$(PREFIX)/$(LIB)
+	$(INSTALL) -c -m 755 $(SONAME) $(DESTDIR)$(PREFIX)/$(LIB)
+	ln -sf $(SONAME) $(DESTDIR)$(PREFIX)/$(LIB)/$(SONAME).$(ABI_MINOR)
+	ln -sf $(SONAME) $(DESTDIR)$(PREFIX)/$(LIB)/libglfw.so
+	$(INSTALL) -d $(DESTDIR)$(PREFIX)/include/GL
+	$(INSTALL) -c -m 644 ../../include/GL/glfw.h $(DESTDIR)$(PREFIX)/include/GL
+	$(INSTALL) -d $(DESTDIR)$(PREFIX)/$(LIB)/pkgconfig
+	$(INSTALL) -c -m 644 libglfw.pc $(DESTDIR)$(PREFIX)/$(LIB)/pkgconfig
 
 
 ##########################################################################
@@ -91,7 +99,7 @@ SHARED_OBJS = \
 # Rule for building libglfw.pc
 ##########################################################################
 libglfw.pc: libglfw.pc.in
-	$(SED) -e 's,\@PREFIX\@,$(PREFIX),' libglfw.pc.in > libglfw.pc
+	$(SED) -e 's,\@PREFIX\@,$(PREFIX),;s,\@LIB\@,$(LIB),' libglfw.pc.in > libglfw.pc
 
 
 ##########################################################################
@@ -104,8 +112,8 @@ libglfw.a: $(STATIC_OBJS)
 ##########################################################################
 # Rule for building shared library
 ##########################################################################
-libglfw.so: $(SHARED_OBJS)
-	$(CC) $(LDFLAGS) -o $@ $(SHARED_OBJS) $(LFLAGS) $(LIBS)
+$(SONAME): $(SHARED_OBJS)
+	$(CC) $(LDFLAGS) -o $@ -Wl,--soname,$(SONAME) $(SHARED_OBJS) $(LFLAGS) $(LIBS)
 
 
 ##########################################################################


--- NEW FILE libglfw.spec ---
Name:           libglfw
Version:        2.6
Release:        3%{?dist}
Summary:        Framework for OpenGL application development

Group:          System Environment/Libraries
License:        zlib
URL:            http://glfw.sourceforge.net
Source0:        http://downloads.sourceforge.net/glfw/glfw-%{version}.tar.bz2
Patch0:         glfw-2.6-dso.patch
BuildRoot:      %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires:  libX11-devel, libXrandr-devel, pth-devel, freeglut-devel

%description
GLFW is a free, open source, portable framework for OpenGL 
application development.

%package devel
Summary:        Development files for %{name}
Group:          Development/Libraries
Requires:       %{name} = %{version}-%{release}
Requires:       pkgconfig

%description devel
The %{name}-devel package contains libraries, header files
and documentation for developing applications that use %{name}.

%prep
%setup -q -n glfw
%patch0 -p1 -b .dso

%build
sh compile.sh 
make %{?_smp_mflags} CC="gcc %{optflags}" PREFIX=%{_prefix} LIB=%{_lib} \
       -C lib/x11 -f Makefile.x11 default libglfw.pc

%install
rm -rf %{buildroot}
make %{?_smp_mflags} PREFIX=%{_prefix} DESTDIR=%{buildroot} LIB=%{_lib} \
        -C lib/x11 -f Makefile.x11 install

%clean
rm -rf %{buildroot}

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root,-)
%{_libdir}/libglfw.so.*
%doc readme.html
%doc license.txt 

%files devel
%defattr(-,root,root,-)
%{_includedir}/GL/glfw.h
%{_libdir}/libglfw.so
%{_libdir}/pkgconfig/*
%doc docs/*.pdf docs/*.txt examples

%changelog
* Thu Jan 08 2009 Lubomir Rintel <lkundrak at v3.sk> 2.6-3
- Major refactor, since this was not properly reviewed
- Get rid of ugly sedding
- Install a DSO properly
- Use SONAME
- Fix Source URL
- Rename SPEC file to match the package name
- Nuke -doc subpackage, move development documentation into -devel
- Include all documentation
- Use macros consistently
- Indent consistently

* Sat Nov 08 2008 Paul F. Johnson <paul at all-the-johnsons.co.uk> 2.6-2
- spec fixes for review 
- added doc subpackage

* Fri Oct 03 2008 Paul F. Johnson <paul at all-the-johnsons.co.uk> 2.6-1
- Initial version


Index: .cvsignore
===================================================================
RCS file: /cvs/pkgs/rpms/libglfw/F-9/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore	16 Nov 2008 20:20:14 -0000	1.1
+++ .cvsignore	8 Jan 2009 14:41:48 -0000	1.2
@@ -0,0 +1 @@
+glfw-2.6.tar.bz2


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/libglfw/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	16 Nov 2008 20:20:14 -0000	1.1
+++ sources	8 Jan 2009 14:41:48 -0000	1.2
@@ -0,0 +1 @@
+0d9b93e6194c3805be9e1c855a985a24  glfw-2.6.tar.bz2




More information about the fedora-extras-commits mailing list