Группа :: Разработка/ML
Пакет: lablgtk2
Главная Изменения Спек Патчи Sources Загрузить Gear Bugs and FR Repocop
%def_without M24
%def_with gl
%def_with glade
%def_with gtkspell
%def_with rsvg
%def_without gnomecanvas
%def_without gnomeui
%def_without panel
%if_with M24
%define _release alt2.M24.1
%else
%define _release alt3.1
%endif
Name: lablgtk2
Version: 2.6.0
Serial: 1
Release: %_release
Packager: Grigory Batalov <bga at altlinux.ru>
Summary: GTK+2 library for OCaml
License: Distributable
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
Patch: lablgtk-2.6.0-alt-native.patch
Requires: lablgtk2-runtime = %version-%release
Requires: labltk, lablGL, gtkglarea2
Requires: ocaml = %{get_SVR ocaml}
BuildRequires(pre): ocaml ocaml-runtime
BuildRequires: camlp4
BuildRequires: libgtk+2-devel, zlib-devel
BuildRequires: libpopt-devel
%if_with gl
BuildRequires: lablGL gtkglarea2-devel
%endif
%if_with glade
BuildRequires: libglade2-devel
%endif
%if_with gtkspell
BuildRequires: libgtkspell-devel
%endif
%if_with rsvg
BuildRequires: librsvg2-devel
%endif
%if_with gnomecanvas
BuildRequires: libgnomecanvas-devel
%endif
%if_with gnomeui
BuildRequires: libgnomeui-devel
%endif
%if_with panel
BuildRequires: libgnome-panel-devel
%endif
%if_with M24
BuildRequires: libGLU-devel XFree86-devel
%else
BuildRequires: libmesa-devel libSM-devel
%endif
%package runtime
Summary: GTK+ runtime stubs for OCaml bindings
Requires: ocaml-runtime = %{get_SVR ocaml-runtime}, lablGL-runtime
Group: Development/ML
%description
GTK+2 bindings library for Objective Caml
%description runtime
GTK+2 bindings library for Objective Caml
%package doc
Summary: Documentation for LablGTK
Group: Development/ML
Requires: lablgtk2 = %{version}-%{release}
%description doc
Documentation for LablGTK.
%prep
%setup -q -n lablgtk-%version
%patch -p0
# version information in META file is wrong
sed -i -e 's,version="1.3.1",version="2.6.0",' \
-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 gtkspell} \
%{subst_with rsvg} \
%{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
%define _compress_method skip
mkdir -p $RPM_BUILD_ROOT%_libdir/ocaml/
mkdir -p $RPM_BUILD_ROOT%_libdir/ocaml/stublibs/
mkdir -p $RPM_BUILD_ROOT%_bindir
%makeinstall \
BINDIR=$RPM_BUILD_ROOT%{_bindir} \
LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/lablgtk2 \
DLLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
cp META $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/lablgtk2
install -m755 src/lablgtktop %buildroot%_bindir/lablgtktop
# remove byte-coded binaries and install native
rm -f %buildroot%_libdir/ocaml/site-lib/lablgtk2/{propcc,varcc}
rm -f %buildroot%_bindir/{lablgladecc2,gdk-pixbuf-mlsource}
install -m755 src/propcc.opt %buildroot%_bindir/propcc
install -m755 src/varcc.opt %buildroot%_bindir/varcc
install -m755 src/lablgladecc.opt %buildroot%_bindir/lablgladecc2
install -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
…
Полный changelog можно просмотреть здесь
%def_with gl
%def_with glade
%def_with gtkspell
%def_with rsvg
%def_without gnomecanvas
%def_without gnomeui
%def_without panel
%if_with M24
%define _release alt2.M24.1
%else
%define _release alt3.1
%endif
Name: lablgtk2
Version: 2.6.0
Serial: 1
Release: %_release
Packager: Grigory Batalov <bga at altlinux.ru>
Summary: GTK+2 library for OCaml
License: Distributable
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
Patch: lablgtk-2.6.0-alt-native.patch
Requires: lablgtk2-runtime = %version-%release
Requires: labltk, lablGL, gtkglarea2
Requires: ocaml = %{get_SVR ocaml}
BuildRequires(pre): ocaml ocaml-runtime
BuildRequires: camlp4
BuildRequires: libgtk+2-devel, zlib-devel
BuildRequires: libpopt-devel
%if_with gl
BuildRequires: lablGL gtkglarea2-devel
%endif
%if_with glade
BuildRequires: libglade2-devel
%endif
%if_with gtkspell
BuildRequires: libgtkspell-devel
%endif
%if_with rsvg
BuildRequires: librsvg2-devel
%endif
%if_with gnomecanvas
BuildRequires: libgnomecanvas-devel
%endif
%if_with gnomeui
BuildRequires: libgnomeui-devel
%endif
%if_with panel
BuildRequires: libgnome-panel-devel
%endif
%if_with M24
BuildRequires: libGLU-devel XFree86-devel
%else
BuildRequires: libmesa-devel libSM-devel
%endif
%package runtime
Summary: GTK+ runtime stubs for OCaml bindings
Requires: ocaml-runtime = %{get_SVR ocaml-runtime}, lablGL-runtime
Group: Development/ML
%description
GTK+2 bindings library for Objective Caml
%description runtime
GTK+2 bindings library for Objective Caml
%package doc
Summary: Documentation for LablGTK
Group: Development/ML
Requires: lablgtk2 = %{version}-%{release}
%description doc
Documentation for LablGTK.
%prep
%setup -q -n lablgtk-%version
%patch -p0
# version information in META file is wrong
sed -i -e 's,version="1.3.1",version="2.6.0",' \
-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 gtkspell} \
%{subst_with rsvg} \
%{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
%define _compress_method skip
mkdir -p $RPM_BUILD_ROOT%_libdir/ocaml/
mkdir -p $RPM_BUILD_ROOT%_libdir/ocaml/stublibs/
mkdir -p $RPM_BUILD_ROOT%_bindir
%makeinstall \
BINDIR=$RPM_BUILD_ROOT%{_bindir} \
LIBDIR=$RPM_BUILD_ROOT%{_libdir} \
INSTALLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/lablgtk2 \
DLLDIR=$RPM_BUILD_ROOT%{_libdir}/ocaml/stublibs
cp META $RPM_BUILD_ROOT%{_libdir}/ocaml/site-lib/lablgtk2
install -m755 src/lablgtktop %buildroot%_bindir/lablgtktop
# remove byte-coded binaries and install native
rm -f %buildroot%_libdir/ocaml/site-lib/lablgtk2/{propcc,varcc}
rm -f %buildroot%_bindir/{lablgladecc2,gdk-pixbuf-mlsource}
install -m755 src/propcc.opt %buildroot%_bindir/propcc
install -m755 src/varcc.opt %buildroot%_bindir/varcc
install -m755 src/lablgladecc.opt %buildroot%_bindir/lablgladecc2
install -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
…
Полный changelog можно просмотреть здесь