X-Git-Url: http://git.pld-linux.org/?a=blobdiff_plain;f=fltk.spec;h=2ab244e5f0c593b696e115729239f0a8d48c04cb;hb=33e36aec6b69b395a60cfdc039a97c663577a788;hp=1375cae8c5c5d604630b1a2e6afe47f60970eef1;hpb=419114255c12337f180cb1a2ce9914178dc8ed25;p=packages%2Ffltk.git diff --git a/fltk.spec b/fltk.spec index 1375cae..2ab244e 100644 --- a/fltk.spec +++ b/fltk.spec @@ -1,33 +1,42 @@ +# TODO: enable cairo support? # # 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 -Release: 3 -License: LGPL with amendments (see COPYING) +Version: 1.3.3 +Release: 1 +License: LGPL v2 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 -# Source1-md5: eb8f5a4a02d8ca2111ff007daea601b6 -Patch0: %{name}-link.patch -Patch1: %{name}-acfix.patch -Patch2: %{name}-fluid-color.patch +Source0: http://fltk.org/pub/fltk/%{version}/%{name}-%{version}-source.tar.gz +# Source0-md5: 9ccdb0d19dc104b87179bd9fd10822e3 +Patch0: %{name}-desktop.patch +Patch1: %{name}-as-needed.patch +Patch2: %{name}-link.patch +Patch3: %{name}-libjpeg.patch +Patch4: %{name}-export.patch URL: http://www.fltk.org/ -%{!?_without_gl:BuildRequires: OpenGL-devel} -BuildRequires: XFree86-devel >= 3.3.6 -BuildRequires: autoconf +%{?with_opengl:BuildRequires: OpenGL-GLU-devel} +BuildRequires: autoconf >= 2.50 +BuildRequires: doxygen +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 +BuildRequires: xorg-lib-libXext-devel +%{?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 @@ -36,137 +45,158 @@ 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 konsolidowana 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 +%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(pl.UTF-8): Gry FLTK +Group: X11/Applications/Games +Requires: %{name} = %{version}-%{release} + +%description games +FLTK games: Block Attack!, Checkers, or Sudoku on your computer. + +%description games -l pl.UTF-8 +Gry FLTK: Atak Klocków!, Warcaby, Sudoku. + %prep %setup -q %patch0 -p1 %patch1 -p1 %patch2 -p1 - -install %{SOURCE1} . +%patch3 -p1 +%patch4 -p1 %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=" " +# gold doesn't understand -l:path/to/library.so +if [ -x /usr/bin/ld.bfd ]; then + install -d ld-dir + ln -sf /usr/bin/ld.bfd ld-dir/ld + export PATH=$(pwd)/ld-dir:$PATH +fi %{__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} +cd documentation +%{__make} html %install rm -rf $RPM_BUILD_ROOT -install -d $RPM_BUILD_ROOT{%{_bindir},%{_includedir}/FL,%{_libdir},%{_mandir}/man{1,3}} - -if [ "%{_lib}" != "lib" ] ; then - ln -sf $RPM_BUILD_ROOT%{_libdir} $RPM_BUILD_ROOT%{_prefix}/lib -fi %{__make} install \ - libdir=$RPM_BUILD_ROOT%{_libdir} \ - includedir=$RPM_BUILD_ROOT%{_includedir} \ - bindir=$RPM_BUILD_ROOT%{_bindir} + install-desktop \ + DESTDIR=$RPM_BUILD_ROOT -if [ "%{_lib}" != "lib" ] ; then - rm $RPM_BUILD_ROOT%{_prefix}/lib -fi +# less generic games' names +for f in blocks checkers sudoku ; do +%{__mv} $RPM_BUILD_ROOT%{_bindir}/{,fltk-}${f} +%{__mv} $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 +# we package mans in groff format +%{__rm} -r $RPM_BUILD_ROOT%{_mandir}/cat? + +# add link to documentation for fluid help; remove /usr/share/doc/fltk contents - it is installed during make install +%{__rm} -r $RPM_BUILD_ROOT%{_datadir}/doc/%{name} +ln -sf %{name}-devel-%{version} $RPM_BUILD_ROOT%{_datadir}/doc/%{name} %clean rm -rf $RPM_BUILD_ROOT @@ -184,24 +214,31 @@ rm -rf $RPM_BUILD_ROOT %files devel %defattr(644,root,root,755) -%doc documentation/*.{html,gif,jpg} fltk.ps.gz +%doc documentation/html/*.{html,jpg,png} +%doc %{_datadir}/doc/%{name} %attr(755,root,root) %{_bindir}/fltk-config %attr(755,root,root) %{_bindir}/fluid %attr(755,root,root) %{_libdir}/libfltk.so %attr(755,root,root) %{_libdir}/libfltk_forms.so %attr(755,root,root) %{_libdir}/libfltk_images.so %{_includedir}/FL -%exclude %{_includedir}/FL/Fl_Gl_Window.* +%exclude %{_includedir}/FL/Fl_Gl_Window.H %exclude %{_includedir}/FL/gl* -%{_mandir}/man[13]/* +%{_iconsdir}/hicolor/*/apps/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.*.* @@ -209,10 +246,25 @@ rm -rf $RPM_BUILD_ROOT %files gl-devel %defattr(644,root,root,755) %attr(755,root,root) %{_libdir}/libfltk_gl.so -%{_includedir}/FL/Fl_Gl_Window.* +%{_includedir}/FL/Fl_Gl_Window.H %{_includedir}/FL/gl* %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*