From 8b639fa0d4f00c0ce8dc2f7b101c08ca7c3e6e8b Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: Tue, 12 Dec 2006 06:02:18 +0000 Subject: [PATCH] - use included icon/.desktop files - fix up fltk-config (#199656) --- fltk.spec | 57 ++++++++++++++++++++++++++++++++++++++----------------- 1 file changed, 40 insertions(+), 17 deletions(-) diff --git a/fltk.spec b/fltk.spec index ff7a462..54dea8f 100644 --- a/fltk.spec +++ b/fltk.spec @@ -2,7 +2,7 @@ Summary: C++ user interface toolkit Name: fltk Version: 1.1.7 -Release: 3%{?dist}.1 +Release: 4%{?dist} License: LGPL with exceptions Group: System Environment/Libraries @@ -10,7 +10,8 @@ URL: http://www.fltk.org/ Source0: http://ftp.easysw.com/pub/fltk/%{version}/%{name}-%{version}-source.tar.bz2 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) -Source1: fluid.desktop +# See http://bugzilla.redhat.com/199656 +Patch1: fltk-1.1.7-config.patch %if 0%{?rhel} > 4 || 0%{?fedora} > 4 BuildRequires: libICE-devel libSM-devel @@ -24,9 +25,7 @@ BuildRequires: zlib-devel BuildRequires: libpng-devel BuildRequires: libGL-devel libGLU-devel BuildRequires: pkgconfig -BuildRequires: ImageMagick BuildRequires: desktop-file-utils -BuildRequires: man %package devel Summary: Development package for %{name} @@ -69,32 +68,46 @@ interactive GUI designer for FLTK. %prep %setup -q -n %{name}-%{version}%{?extraversion} +%patch1 -p1 -b .199656 + %build -perl -pi -e "s^\\\$prefix/share/doc/fltk^$RPM_DOC_DIR/%{name}-devel-%{version}^" configure export CPPFLAGS="$(pkg-config xft --cflags)" export LDFLAGS="$(pkg-config xft --libs)" -%configure --enable-shared --enable-threads --enable-xdbe --enable-xft +%configure \ + --disable-static \ + --enable-shared \ + --enable-threads \ + --enable-xdbe \ + --enable-xft make %{?_smp_mflags} %install -rm -rf $RPM_BUILD_ROOT __documentation -%makeinstall docdir=$(pwd)/__documentation -rm -rf $RPM_BUILD_ROOT%{_mandir}/cat* +rm -rf $RPM_BUILD_ROOT +make install install-desktop DESTDIR=$RPM_BUILD_ROOT -desktop-file-install --vendor=fedora \ - --dir $RPM_BUILD_ROOT%{_datadir}/applications \ - %{SOURCE1} +desktop-file-install --vendor=%{name} \ + --dir $RPM_BUILD_ROOT%{_datadir}/applications \ + --add-category="Development" \ + --add-category="GUIDesigner" \ + --delete-original \ + $RPM_BUILD_ROOT%{_datadir}/applnk/Development/*.desktop -convert -resize 48x48 documentation/FL.gif fluid.png -install -p -m644 -D fluid.png $RPM_BUILD_ROOT%{_datadir}/icons/hicolor/48x48/apps/fluid.png +# docs +rm -rf __docs +mv $RPM_BUILD_ROOT%{_docdir}/fltk __docs ## unpackaged files +# errant docs +rm -rf $RPM_BUILD_ROOT%{_mandir}/cat* # static libs -rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.a +rm -f $RPM_BUILD_ROOT%{_libdir}/lib*.a +# games: checkers/sudoku +make -C test uninstall-linux DESTDIR=$RPM_BUILD_ROOT +rm -f $RPM_BUILD_ROOT%{_mandir}/man?/{sudoku,checkers}* %clean @@ -107,9 +120,13 @@ rm -rf $RPM_BUILD_ROOT %post fluid touch --no-create %{_datadir}/icons/hicolor ||: +gtk-update-icon-cache -q %{_datadir}/icons/hicolor 2> /dev/null ||: +update-desktop-database >& /dev/null ||: %postun fluid touch --no-create %{_datadir}/icons/hicolor ||: +gtk-update-icon-cache -q %{_datadir}/icons/hicolor 2> /dev/null ||: +update-desktop-database >& /dev/null ||: %files @@ -122,10 +139,10 @@ touch --no-create %{_datadir}/icons/hicolor ||: %files devel %defattr(-,root,root,-) -%doc __documentation/* +%doc __docs/* %{_bindir}/fltk-config %{_includedir}/FL/ -%{_includedir}/Fl/ +%{_includedir}/Fl %{_libdir}/libfltk.so %{_libdir}/libfltk_forms.so %{_libdir}/libfltk_gl.so @@ -138,10 +155,16 @@ touch --no-create %{_datadir}/icons/hicolor ||: %{_bindir}/fluid %{_mandir}/man1/fluid.1* %{_datadir}/applications/*fluid.desktop +# FIXME +%{_datadir}/mimelnk/*/*.desktop %{_datadir}/icons/hicolor/*/*/* %changelog +* Mon Dec 11 2006 Rex Dieter 1.1.7-4 +- use included icon/.desktop files +- fix up fltk-config (#199656) + * Mon Dec 11 2006 Rex Dieter 1.1.7-3 - follow icon spec - omit static libs