Author: guillomovitch
Date: Wed Feb 14 17:26:36 2007
New Revision: 121012

Modified:
   packages/cooker/ocaml-pcre/current/SPECS/ocaml-pcre.spec

Log:
fix chicken-and-egg issue in rpm macro definition

Modified: packages/cooker/ocaml-pcre/current/SPECS/ocaml-pcre.spec
==============================================================================
--- packages/cooker/ocaml-pcre/current/SPECS/ocaml-pcre.spec    (original)
+++ packages/cooker/ocaml-pcre/current/SPECS/ocaml-pcre.spec    Wed Feb 14 
17:26:36 2007
@@ -1,7 +1,7 @@
 %define name   ocaml-pcre
 %define version        5.11.2
 %define release        %mkrel 1
-%define ocamllib %(ocamlc -where)/site-lib
+%define ocaml_sitelib %(if [ -x /usr/bin/ocamlc ]; then ocamlc 
-where;fi)/site-lib
 
 Name:          %{name}
 Version:       %{version}
@@ -41,8 +41,8 @@
 
 %install
 rm -rf %{buildroot}
-install -d -m 755 %{buildroot}/%{ocamllib}
-make install OCAMLFIND_INSTFLAGS="-destdir %{buildroot}/%{ocamllib} -ldconf 
foo.ld.conf"
+install -d -m 755 %{buildroot}/%{ocaml_sitelib}
+make install OCAMLFIND_INSTFLAGS="-destdir %{buildroot}/%{ocaml_sitelib} 
-ldconf foo.ld.conf"
 
 %clean
 rm -rf %{buildroot}
@@ -50,11 +50,11 @@
 %files
 %defattr(-,root,root)
 %doc Changes INSTALL LICENSE README VERSION
-%{ocamllib}/pcre
-%exclude %{ocamllib}/pcre/*.a
-%exclude %{ocamllib}/pcre/*.cmi
+%{ocaml_sitelib}/pcre
+%exclude %{ocaml_sitelib}/pcre/*.a
+%exclude %{ocaml_sitelib}/pcre/*.cmi
 
 %files devel
 %defattr(-,root,root)
-%{ocamllib}/pcre/*.a
-%{ocamllib}/pcre/*.cmi
+%{ocaml_sitelib}/pcre/*.a
+%{ocaml_sitelib}/pcre/*.cmi

Reply via email to