Пакет lablgtk2: Specfile

%def_with gl
%def_with glade
%def_with rsvg
%def_with gtkspell
%def_with gtksourceview
%def_without gnomecanvas
%def_without gnomeui
%def_without panel

Name: lablgtk2
Version: 2.10.1
Release: alt5
Epoch: 1
Packager: Veaceslav Grecea <slavutich@altlinux.org>

Summary: GTK+2 bindings for OCaml
License: LGPL
Group: Development/ML
Url: http://wwwfun.kurims.kyoto-u.ac.jp/soft/

Source: http://wwwfun.kurims.kyoto-u.ac.jp/soft/olabl/dist/lablgtk-%version.tar.gz
Patch1: lablgtk-2.6.0-alt-native.patch
Patch2: lablgtk-up-rename-g_value_get_variant.patch

Requires: %name-runtime = %epoch:%version-%release

# Automatically added by buildreq on Fri Dec 12 2008
BuildRequires: camlp4 gtkglarea2-devel lablGL libGConf-devel libglade-devel libgtksourceview1-devel libgtkspell-devel librsvg-devel ocamldoc

%if_with gnomecanvas
BuildRequires: libgnomecanvas-devel
%endif

%if_with gnomeui
BuildRequires: libgnomeui-devel
%endif

%if_with panel
BuildRequires: libgnome-panel-devel
%endif

%package runtime
Summary: GTK+2 bindings for OCaml
Group: Development/ML

%package doc
Summary: GTK+2 bindings for OCaml
Group: Development/ML
BuildArch: noarch
Conflicts: %name < %epoch:%version, %name > %epoch:%version

%description
LablGTK is is an OCaml interface to GTK+2.  It uses the rich type
system of Objective Caml 3 to provide a strongly typed, yet very
comfortable, object-oriented interface to GTK+.

%description runtime
LablGTK is is an OCaml interface to GTK+2.  It uses the rich type
system of Objective Caml 3 to provide a strongly typed, yet very
comfortable, object-oriented interface to GTK+.

%description doc
LablGTK is is an OCaml interface to GTK+2.  It uses the rich type
system of Objective Caml 3 to provide a strongly typed, yet very
comfortable, object-oriented interface to GTK+.

%prep
%setup -n lablgtk-%version
%patch1 -p0
%patch2 -p1
# version information in META file is wrong
sed -i -e 's,version="[^"]*",version="%version",' \
       -e 's,directory="+lablgtk2",directory="+site-lib/lablgtk2",' META

%build
export LABLGLDIR=%_libdir/ocaml/site-lib/lablGL
%configure \
	%{subst_with gl} \
	%{subst_with glade} \
	%{subst_with rsvg} \
	%{subst_with gtkspell} \
	%{subst_with gtksourceview} \
	%{subst_with gnomecanvas} \
	%{subst_with gnomeui} \
	%{subst_with panel} \
	#
sed -i -e 's,-O,%optflags,' src/Makefile
make all opt doc INSTALLDIR=%_libdir/ocaml/site-lib/lablgtk2

%install
mkdir -p %buildroot%_libdir/ocaml/stublibs
mkdir -p %buildroot%_bindir
%makeinstall \
	BINDIR=%buildroot%_bindir \
	LIBDIR=%buildroot%_libdir \
	INSTALLDIR=%buildroot%_libdir/ocaml/site-lib/lablgtk2 \
	DLLDIR=%buildroot%_libdir/ocaml/stublibs
install -p -m644 META %buildroot%_libdir/ocaml/site-lib/lablgtk2/
install -p -m755 src/lablgtktop %buildroot%_bindir/lablgtktop

%if_with gtksourceview
install -p -m644 src/gtkSourceView_types.{mli,cmi} %buildroot%_libdir/ocaml/site-lib/lablgtk2/
%endif

# remove byte-coded binaries and install native
rm %buildroot%_libdir/ocaml/site-lib/lablgtk2/{propcc,varcc}
rm %buildroot%_bindir/{lablgladecc2,gdk-pixbuf-mlsource}
install -p -m755 src/propcc.opt %buildroot%_bindir/propcc
install -p -m755 src/varcc.opt %buildroot%_bindir/varcc
install -p -m755 src/lablgladecc.opt %buildroot%_bindir/lablgladecc2
install -p -m755 src/gdk-pixbuf-mlsource.opt %buildroot%_bindir/gdk-pixbuf-mlsource

%files
%doc CHANGES COPYING README examples/
%exclude %_bindir/lablgtktop
%_bindir/*
%dir %_libdir/ocaml/site-lib/lablgtk2
%_libdir/ocaml/site-lib/lablgtk2/META
%_libdir/ocaml/site-lib/lablgtk2/*.ml*
%_libdir/ocaml/site-lib/lablgtk2/*.cm?*
%_libdir/ocaml/site-lib/lablgtk2/*.h
%_libdir/ocaml/site-lib/lablgtk2/*.o
%_libdir/ocaml/site-lib/lablgtk2/*.a

%files runtime
%_bindir/lablgtktop
%_libdir/ocaml/stublibs/dll*.so

%files doc
%doc doc/html

%changelog
* Wed Jul 06 2011 Dmitry V. Levin <ldv@altlinux.org> 1:2.10.1-alt5
- Fixed build.

* Fri Dec 12 2008 Veaceslav Grecea <slavutich@altlinux.org> 1:2.10.1-alt4
- rebuild

* Thu Apr 10 2008 Alexey Tourbin <at@altlinux.ru> 1:2.10.1-alt3
- install gtkSourceView_types.{mli,cmi}, to fix unmet dependencies

* Tue Apr 08 2008 Alexey Tourbin <at@altlinux.ru> 1:2.10.1-alt2
- rebuilt for new ocaml dependencies

* Wed Mar 12 2008 Grigory Batalov <bga@altlinux.ru> 1:2.10.1-alt1
- New upstream release.

* Sun Nov 04 2007 L.A. Kostis <lakostis@altlinux.ru> 1:2.10.0-alt1.1
- enable rsvg build (2th try) :)

* Thu Oct 04 2007 Grigory Batalov <bga@altlinux.ru> 1:2.10.0-alt1
- New upstream release.

* Sat Apr 21 2007 LAKostis <lakostis at altlinux.ru> 1:2.6.0-alt3.1
- Enable rsvg support (need for mldonkey).

* Thu Dec 21 2006 Grigory Batalov <bga@altlinux.ru> 1:2.6.0-alt3
- Prepare for backporting to Master 2.4.
- Increment serial to allow 20040319 => 2.6.0 upgrade.
- Build native binaries and move them to the main package.
- Requirements updated.
- Strict packaging.
- Moved to site-lib folder.
- Conditional build requirements.
- New packager.

* Wed May 10 2006 LAKostis <lakostis at altlinux.ru> 2.6.0-alt2
- 2th try for x86_64 ;)

* Tue Apr 25 2006 LAKostis <lakostis at altlinux.ru> 2.6.0-alt1
- NMU;
- 2.6.0;
- Cleanup Buildreq.
- Sync with Fedora:
  + get rid of hacky install patch.
  + add -doc package.

* Tue Mar 21 2006 Pavlov Konstantin <thresh@altlinux.ru> 2.4.0-alt4
- moving to get_dep macro.

* Tue Mar 07 2006 Pavlov Konstantin <thresh@altlinux.ru> 2.4.0-alt3
- Rebuild with ocaml-3.0.9-alt1.

* Wed Dec 28 2005 ALT QA Team Robot <qa-robot@altlinux.org> 2.4.0-alt2.1
- Rebuild with ocaml-3.08.1-alt1.1 .

* Mon Nov 01 2004 Vitaly Lugovsky <vsl@altlinux.ru> 2.4.0-alt2
- new version

* Sun Jul 18 2004 Vitaly Lugovsky <vsl@altlinux.ru> 20040319-alt2
- rebuild

* Fri May  7 2004 Alexander V. Nikolaev <avn@altlinux.org> 20040319-alt1.1
- Non-maintainer upload
- Add "packager" to spec
- Rebuild with glibc 2.3.x and ocaml 3.07-alt6.1

* Mon Mar 22 2004 Vitaly Lugovsky <vsl@altlinux.ru> 20040319-alt1
- cvs version

* Wed Mar 17 2004 Vitaly Lugovsky <vsl@altlinux.ru> 2.2.0-alt5
- rebuild

* Wed Feb 18 2004 Vitaly Lugovsky <vsl@altlinux.ru> 2.2.0-alt4
- rebuild

* Tue Jan 27 2004 Vitaly Lugovsky <vsl@altlinux.ru> 2.2.0-alt3
rebuild

* Wed Nov 12 2003 Vitaly Lugovsky <vsl@altlinux.ru> 2.2.0-alt2
relaxed elf verifying

* Fri Oct 10 2003 Vitaly Lugovsky <vsl@altlinux.ru> 2.2.0-alt1
- initial release