]> git.pld-linux.org Git - packages/fltk.git/blobdiff - fltk.spec
- BR: groff
[packages/fltk.git] / fltk.spec
index 410e2527a64792ea31160d9a4af4d7653e9b519e..7a92085625d0fd2847c32061dcfe4e4f4e39e37c 100644 (file)
--- a/fltk.spec
+++ b/fltk.spec
@@ -1,32 +1,43 @@
 #
 # Conditional build:
-# _without_gl  - without OpenGL libraries
-# _without_xft - without Xft support
+%bcond_without opengl  # without OpenGL libraries
+%bcond_without xft     # without Xft support
 #
 Summary:       Fast Light Tool Kit
-Summary(pl):   FLTK - "lekki" X11 toolkit
-Summary(pt_BR):        Interface gráfica em C++ para X, OpenGL e Windows
+Summary(pl.UTF-8):     FLTK - "lekki" X11 toolkit
+Summary(pt_BR.UTF-8):  Interface gráfica em C++ para X, OpenGL e Windows
 Name:          fltk
-Version:       1.1.3
+Version:       1.1.10
 Release:       1
 License:       LGPL with amendments (see COPYING)
 Group:         X11/Libraries
-Source0:       ftp://ftp.easysw.com/pub/%{name}/%{version}/%{name}-%{version}-source.tar.bz2
-# Source0-md5: f32b4acc456d567a6bd554ac03c24055
-Source1:       http://www.fltk.org/doc-1.1/%{name}.ps.gz
-Patch0:                %{name}-link.patch
-Patch1:                %{name}-acfix.patch
+Source0:       http://ftp.easysw.com/pub/fltk/%{version}/%{name}-%{version}-source.tar.bz2
+# Source0-md5: a1765594bc427ff892e36089fe1fa672
+Source1:       http://www.fltk.org/doc-1.1/%{name}.pdf
+# Source1-md5: 31ed176facf7531ad46bb232fb24906b
+Patch0:                %{name}-desktop.patch
+Patch1:                %{name}-1.1.9-as-needed.patch
+Patch2:                %{name}-1.1.9-glibc2.10-scandir.patch
+Patch3:                %{name}-link.patch
 URL:           http://www.fltk.org/
-%{!?_without_gl:BuildRequires: OpenGL-devel}
-BuildRequires: XFree86-devel >= 3.3.6
+%{?with_opengl:BuildRequires:  OpenGL-GLU-devel}
 BuildRequires: autoconf
+BuildRequires: groff
+BuildRequires: libjpeg-devel
+BuildRequires: libpng-devel
 BuildRequires: libstdc++-devel
-%{!?_without_xft:BuildRequires:        xft-devel}
-BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
+BuildRequires: rpmbuild(macros) >= 1.315
+%{?with_xft:BuildRequires:     xorg-lib-libXft-devel}
+BuildRequires: xorg-lib-libXinerama-devel
+BuildRequires: xorg-util-makedepend
 Obsoletes:     libfltk1.1
+BuildRoot:     %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 
 %define                _noautoreqdep   libGL.so.1 libGLU.so.1
 
+# don't propagate strip-flags to fltk-config.
+%define                filterout_ld    (-Wl,)?-[sS] (-Wl,)?--strip.*
+
 %description
 The Fast Light Tool Kit ("FLTK", pronounced "fulltick") is a LGPL'd
 C++ graphical user interface toolkit for X (UNIX(r)), OpenGL(r), and
@@ -34,127 +45,148 @@ Microsoft(r) Windows(r) NT 4.0, 95, or 98. It was originally developed
 by Mr. Bill Spitzak and is currently maintained by a small group of
 developers across the world with a central repository in the US.
 
-%description -l pl
-Fast Light Tool Kit ("FLTK", wymawiane "faltik"), jest rozprowadzanym
-na licencji LGPL narzêdziem do tworzenia graficznych interfejsów
-u¿ytkownika w C++ dla X (UNIX(r)), OpenGL(r), i Microsoft(r)
+%description -l pl.UTF-8
+Fast Light Tool Kit ("FLTK", wymawiane "fultik"), jest rozprowadzanym
+na licencji LGPL narzędziem do tworzenia graficznych interfejsów
+użytkownika w C++ dla X (UNIX(r)), OpenGL(r), i Microsoft(r)
 Windows(r) NT 4.0, 95, oraz 98. Jego pierwotnym autorem jest pan Bill
-Spitzak; obecnie pakiet jest rozwijany przez niewielk± grupê
-deweloperów z ró¿nych stron ¶wiata (centralne repozytorium znajduje
-siê w USA).
+Spitzak; obecnie pakiet jest rozwijany przez niewielką grupę
+deweloperów z różnych stron świata (centralne repozytorium znajduje
+się w USA).
 
-%description -l pt_BR
-A Fast Light Tool Kit ("FLTK", pronuncia-se "fulltick") é uma
-ferramenta e interface gráfica feita em C++ para desenvolver
+%description -l pt_BR.UTF-8
+A Fast Light Tool Kit ("FLTK", pronuncia-se "fulltick") é uma
+ferramenta e interface gráfica feita em C++ para desenvolver
 aplicativos para o X, OpenGL e Windows.
 
 %package devel
 Summary:       FLTK development files
-Summary(pl):   Narzêdzia programistyczne dla FLTK
-Summary(pt_BR):        Arquivos de inclusão para o FLTK
+Summary(pl.UTF-8):     Narzędzia programistyczne dla FLTK
+Summary(pt_BR.UTF-8):  Arquivos de inclusão para o FLTK
 Group:         X11/Development/Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
+Requires:      libjpeg-devel
+Requires:      libpng-devel
+Requires:      libstdc++-devel
+%{?with_xft:Requires:  xorg-lib-libXft-devel}
+Requires:      xorg-lib-libXinerama-devel
 Obsoletes:     libfltk1.1-devel
 
 %description devel
 FLTK development files.
 
-%description devel -l pl
-Narzêdzia programistyczne dla FLTK.
+%description devel -l pl.UTF-8
+Narzędzia programistyczne dla FLTK.
 
-%description devel -l pt_BR
-Arquivos de inclusão para o FLTK.
+%description devel -l pt_BR.UTF-8
+Arquivos de inclusão para o FLTK.
 
 %package static
 Summary:       FLTK static library
-Summary(pl):   Biblioteka FLTK linkowana statycznie
-Summary(pt_BR):        Bibliotecas estáticas para o FLTK
+Summary(pl.UTF-8):     Biblioteka FLTK konsolidowana statycznie
+Summary(pt_BR.UTF-8):  Bibliotecas estáticas para o FLTK
 Group:         X11/Development/Libraries
-Requires:      %{name}-devel = %{version}
+Requires:      %{name}-devel = %{version}-%{release}
 
 %description static
 FLTK static library.
 
-%description static -l pl
-Biblioteka FLTK linkowana statycznie.
+%description static -l pl.UTF-8
+Biblioteka FLTK konsolidowana statycznie.
 
-%description static -l pt_BR
-Bibliotecas estáticas para o FLTK.
+%description static -l pt_BR.UTF-8
+Bibliotecas estáticas para o FLTK.
 
 %package gl
 Summary:       FLTK GL library
-Summary(pl):   Biblioteka FLTK GL
+Summary(pl.UTF-8):     Biblioteka FLTK GL
 Group:         X11/Libraries
-Requires:      %{name} = %{version}
+Requires:      %{name} = %{version}-%{release}
 Requires:      OpenGL
 
 %description gl
 FLTK GL library.
 
-%description gl -l pl
+%description gl -l pl.UTF-8
 Biblioteka FLTK GL.
 
 %package gl-devel
 Summary:       Header files for FLTK GL library
-Summary(pl):   Pliki nag³ówkowe biblioteki FLTK GL
+Summary(pl.UTF-8):     Pliki nagłówkowe biblioteki FLTK GL
 Group:         X11/Development/Libraries
-Requires:      %{name}-devel = %{version}
-Requires:      %{name}-gl = %{version}
+Requires:      %{name}-devel = %{version}-%{release}
+Requires:      %{name}-gl = %{version}-%{release}
 
 %description gl-devel
 Header files for FLTK GL library.
 
-%description gl-devel -l pl
-Pliki nag³ówkowe biblioteki FLTK GL.
+%description gl-devel -l pl.UTF-8
+Pliki nagłówkowe biblioteki FLTK GL.
 
 %package gl-static
 Summary:       FLTK GL static library
-Summary(pl):   Statyczna biblioteka FLTK GL
+Summary(pl.UTF-8):     Statyczna biblioteka FLTK GL
 Group:         X11/Development/Libraries
-Requires:      %{name}-gl-devel = %{version}
-Requires:      %{name}-static = %{version}
+Requires:      %{name}-gl-devel = %{version}-%{release}
+Requires:      %{name}-static = %{version}-%{release}
 
 %description gl-static
 FLTK GL static library.
 
-%description gl-static -l pl
+%description gl-static -l pl.UTF-8
 Statyczna biblioteka FLTK GL.
 
+%package games
+Summary:       FLTK Games
+Summary:       Gry FLTK
+Group:         X11/Applications/Games
+Requires:      %{name} = %{version}-%{release}
+
+%description games
+FLTK games: Block Attack!, Checkers, or Sudoku on your computer.
+
+%description -l pl.UTF-8
+Gry FLTK: Atak Klocków!, Warcaby, Sudoku.
+
 %prep
 %setup -q
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
+%patch3 -p1
 
 install %{SOURCE1} .
 
 %build
-CPPFLAGS="-I/usr/X11R6/include"
-CXXFLAGS="%{rpmcflags} -I/usr/include/freetype2"
-# no "-s" in LDFLAGS, they are propagated to fltk-config
-# (together with -L/usr/X11R6/lib, so cannot be removed)
-LDFLAGS=" "
 %{__autoconf}
 %configure \
+       --enable-largefile \
        --enable-shared \
+       --enable-threads \
+       --enable-xinerama \
        --with-x \
-       %{?_without_gl:--disable-gl} \
-       %{!?_without_xft:--enable-xft}
+       --with-optim="%{rpmcxxflags}" \
+       %{!?with_opengl:--disable-gl} \
+       %{?with_xft:--enable-xft}
 
-%{__make} depend
 %{__make}
 
 %install
 rm -rf $RPM_BUILD_ROOT
-install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/FL,%{_libdir},%{_mandir}/man{1,3}}
 
 %{__make} install \
-       libdir=$RPM_BUILD_ROOT%{_libdir} \
-       includedir=$RPM_BUILD_ROOT%{_includedir} \
-       bindir=$RPM_BUILD_ROOT%{_bindir}
+       install-desktop \
+       DESTDIR=$RPM_BUILD_ROOT
+
+# less generic games' names
+for f in blocks checkers sudoku ; do
+mv -f $RPM_BUILD_ROOT%{_bindir}/{,fltk-}${f}
+mv -f $RPM_BUILD_ROOT%{_mandir}/man6/{,fltk-}${f}.6
+done
 
-install documentation/fltk-config.man $RPM_BUILD_ROOT%{_mandir}/man1/fltk-config.1
-install documentation/fluid.man $RPM_BUILD_ROOT%{_mandir}/man1/fluid.1
-install documentation/fltk.man $RPM_BUILD_ROOT%{_mandir}/man3/fltk.3
+# add link to documentation for fluid help; remove /usr/share/doc/fltk contents - it is installed during make install
+rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
+ln -sf %{name}-devel-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/%{name}
 
 %clean
 rm -rf $RPM_BUILD_ROOT
@@ -172,7 +204,8 @@ rm -rf $RPM_BUILD_ROOT
 
 %files devel
 %defattr(644,root,root,755)
-%doc documentation/*.{html,gif,jpg} fltk.ps.gz
+%doc documentation/*.{html,gif,jpg} fltk.pdf
+%doc %{_datadir}/doc/%{name}
 %attr(755,root,root) %{_bindir}/fltk-config
 %attr(755,root,root) %{_bindir}/fluid
 %attr(755,root,root) %{_libdir}/libfltk.so
@@ -181,15 +214,21 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/FL
 %exclude %{_includedir}/FL/Fl_Gl_Window.*
 %exclude %{_includedir}/FL/gl*
-%{_mandir}/man[13]/*
+%{_iconsdir}/*/*/*/fluid.png
+%{_desktopdir}/fluid.desktop
+# move to some KDE package?
+#%{_datadir}/mimelnk/application/x-fluid.desktop
+%{_mandir}/man1/fltk-config.1*
+%{_mandir}/man1/fluid.1*
+%{_mandir}/man3/fltk.3*
 
 %files static
 %defattr(644,root,root,755)
-%attr(644,root,root) %{_libdir}/libfltk.a
-%attr(644,root,root) %{_libdir}/libfltk_forms.a
-%attr(644,root,root) %{_libdir}/libfltk_images.a
+%{_libdir}/libfltk.a
+%{_libdir}/libfltk_forms.a
+%{_libdir}/libfltk_images.a
 
-%if 0%{!?_without_gl:1}
+%if %{with opengl}
 %files gl
 %defattr(644,root,root,755)
 %attr(755,root,root) %{_libdir}/libfltk_gl.so.*.*
@@ -202,5 +241,20 @@ rm -rf $RPM_BUILD_ROOT
 
 %files gl-static
 %defattr(644,root,root,755)
-%attr(644,root,root) %{_libdir}/libfltk_gl.a
+%{_libdir}/libfltk_gl.a
 %endif
+
+%files games
+%defattr(644,root,root,755)
+%attr(755,root,root) %{_bindir}/%{name}-blocks
+%attr(755,root,root) %{_bindir}/%{name}-checkers
+%attr(755,root,root) %{_bindir}/%{name}-sudoku
+%{_iconsdir}/*/*/*/blocks.png
+%{_iconsdir}/*/*/*/checkers.png
+%{_iconsdir}/*/*/*/sudoku.png
+%{_desktopdir}/blocks.desktop
+%{_desktopdir}/checkers.desktop
+%{_desktopdir}/sudoku.desktop
+%{_mandir}/man6/%{name}-blocks.6*
+%{_mandir}/man6/%{name}-checkers.6*
+%{_mandir}/man6/%{name}-sudoku.6*
This page took 0.097438 seconds and 4 git commands to generate.