aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorOlivier Thauvin <nanardon@mandriva.org>2005-08-03 09:55:25 +0000
committerOlivier Thauvin <nanardon@mandriva.org>2005-08-03 09:55:25 +0000
commitba0b7b7637e29319ddfb807dfafed74be97ecb8b (patch)
treebaeaa9b9fa56a80df658f81d63c3da7009d5d72f
parentc16856c304b387cd0c4506dcb859c9320335804e (diff)
downloadrpm-setup-ba0b7b7637e29319ddfb807dfafed74be97ecb8b.tar
rpm-setup-ba0b7b7637e29319ddfb807dfafed74be97ecb8b.tar.gz
rpm-setup-ba0b7b7637e29319ddfb807dfafed74be97ecb8b.tar.bz2
rpm-setup-ba0b7b7637e29319ddfb807dfafed74be97ecb8b.tar.xz
rpm-setup-ba0b7b7637e29319ddfb807dfafed74be97ecb8b.zip
- some macro from connectiva
-rw-r--r--ChangeLog12
-rw-r--r--macros.in78
2 files changed, 71 insertions, 19 deletions
diff --git a/ChangeLog b/ChangeLog
index e72192a..594bff6 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2005-06-27 17:09 Olivier Thauvin <thauvin@aerov.jussieu.fr>
+
+ * macros.in: - add %__{chkconfig,service} macros
+
+2005-06-25 09:43 Olivier Thauvin <thauvin@aerov.jussieu.fr>
+
+ * rpm-mandriva-setup.spec: - requires multiarch utils
+
+2005-06-23 04:29 Olivier Thauvin <thauvin@aerov.jussieu.fr>
+
+ * rpm-mandriva-setup.spec: - add requirement for update
+
2005-06-22 14:00 Olivier Thauvin <thauvin@aerov.jussieu.fr>
* rpm-mandriva-setup.spec: - split for dep
diff --git a/macros.in b/macros.in
index 2e0684d..3ae1aff 100644
--- a/macros.in
+++ b/macros.in
@@ -498,25 +498,25 @@ Provides: %{1} = %{version}-%{release}
#--------------------------------------------------------------------------------
# --without section
-%prep %{?_without_prep:%define __spec_prep_cmd /bin/true\
-%%prep\
-%{warn:Skipping %%prep stage\
-}}%{?!_without_prep:%%prep}
-
-%build %{?_without_build:%define __spec_build_cmd /bin/true\
-%%build\
-%{warn:Skipping %%build stage\
-}}%{?!_without_build:%%build}
-
-%install %{?_without_install:%define __spec_install_cmd /bin/true\
-%%install\
-%{warn:Skipping %%install stage\
-}}%{?!_without_install:%%install}
-
-%check %{?_without_check:%define __spec_check_cmd /bin/true\
-%%check\
-%{warn:Skipping %%check stage\
-}}%{?!_without_check:%%check}
+#%prep %{?_without_prep:%define __spec_prep_cmd /bin/true\
+#%%prep\
+#%{warn:Skipping %%prep stage\
+#}}%{?!_without_prep:%%prep}
+#
+#%build %{?_without_build:%define __spec_build_cmd /bin/true\
+#%%build\
+#%{warn:Skipping %%build stage\
+#}}%{?!_without_build:%%build}
+#
+#%install %{?_without_install:%define __spec_install_cmd /bin/true\
+#%%install\
+#%{warn:Skipping %%install stage\
+#}}%{?!_without_install:%%install}
+#
+#%check %{?_without_check:%define __spec_check_cmd /bin/true\
+#%%check\
+#%{warn:Skipping %%check stage\
+#}}%{?!_without_check:%%check}
# Shorthand for %{defined with_...}
# macros provided by rpm 4.4, but buggy :(
@@ -534,3 +534,43 @@ Internationalization and locale data for %{?1:%{1}}%{?!1:%{name}}\
\
%%files -n %{?1:%{1}}%{?!1:%{name}}-i18n %{?-f:%{-f}}%{?!-f:-f %{?1:%{1}}%{?!1:%{name}}.lang}\
%{nil}
+
+#------------------------------------------------------------------------------
+# Python specific macro definitions (originally from PLD).
+#
+%py_ver %(python -c "import sys; v=sys.version_info[:2]; print '%%d.%%d'%%v" 2>/dev/null || echo PYTHON-NOT-FOUND)
+%py_prefix %(python -c "import sys; print sys.prefix" 2>/dev/null || echo PYTHON-NOT-FOUND)
+%py_libdir %{py_prefix}/lib/python%{py_ver}
+%py_incdir %{py_prefix}/include/python%{py_ver}
+%py_sitedir %{py_libdir}/site-packages
+%py_compile(O) \
+find %1 -name '*.pyc' -exec rm -f {} \\; \
+python -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
+%{-O: \
+find %1 -name '*.pyo' -exec rm -f {} \\; \
+python -O -c "import sys, os, compileall; br='%{buildroot}'; compileall.compile_dir(sys.argv[1], ddir=br and (sys.argv[1][len(os.path.abspath(br)):]+'/') or None)" %1 \
+}
+%py_requires(d) \
+%define minver %py_ver \
+%define maxver %(python -c "import sys; a,b=sys.version_info[:2]; print '%%d.%%d'%%(a,b+1)" 2>/dev/null || echo PYTHON-NOT-FOUND) \
+BuildRequires: python %{-d:python-devel} \
+PreReq: python >= %minver, python < %maxver
+
+#------------------------------------------------------------------------------
+# Redefine RPM sections to allow jumping over them
+#
+
+%prep %%prep \
+[ %{_with prep} -eq 1 ] || exit 0 \
+[ %{_with build} -eq 1 ] || exit 0 \
+[ %{_with install} -eq 1 ] || exit 0 \
+%{nil}
+
+%build %%build \
+[ %{_with install} -eq 1 ] || exit 0 \
+[ %{_with build} -eq 1 ] || exit 0 \
+%{nil}
+
+%install %%install \
+[ %{_with install} -eq 1 ] || exit 0 \
+%{nil}