From 0ef4cc05fba22ddcd69513d9a25e92085a24d9b9330bb6f778fe2294310f4c36 Mon Sep 17 00:00:00 2001 From: Jan Engelhardt Date: Thu, 8 Jan 2015 09:53:01 +0000 Subject: [PATCH] Ship a pkgconfig file OBS-URL: https://build.opensuse.org/package/show/graphics/SDL_bgi?expand=0&rev=3 --- SDL_bgi.spec | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/SDL_bgi.spec b/SDL_bgi.spec index f91b1a1..9d7a22a 100644 --- a/SDL_bgi.spec +++ b/SDL_bgi.spec @@ -29,6 +29,7 @@ Source: http://libxbgi.sourceforge.net/%name-%version.tar.gz Patch1: sdlbgi-automake.diff BuildRequires: automake >= 1.11 BuildRequires: libtool >= 2 +BuildRequires: pkg-config BuildRequires: pkgconfig(SDL_gfx) BuildRoot: %{_tmppath}/%{name}-%{version}-build @@ -50,6 +51,7 @@ SDL. It provides extensions for RGB colors and mouse support. Summary: Libraries, includes and more to develop SDL_bgi applications Group: Development/Libraries/X11 Requires: %lname = %version +Requires: pkgconfig(sdl) Provides: SDL_bgi-devel = %version-%release %description -n libSDL_bgi-devel @@ -72,7 +74,15 @@ make %{?_smp_mflags} %install %make_install -rm -f "%buildroot/%_libdir"/*.la +b="%buildroot" +rm -f "$b/%_libdir"/*.la +mkdir -p "$b/%_libdir/pkgconfig" +cat >"$b/%_libdir/pkgconfig/SDL_bgi.pc" <<-EOF + Name: SDL_bgi + Version: %version + Requires: sdl + Libs: -lSDL_bgi +EOF %post -n %lname -p /sbin/ldconfig %postun -n %lname -p /sbin/ldconfig @@ -87,5 +97,6 @@ rm -f "%buildroot/%_libdir"/*.la %doc *.txt %_includedir/*.h %_libdir/libSDL_bgi.so +%_libdir/pkgconfig/SDL_bgi.pc %changelog