[packages/poldek] Th snapshot support
baggins
baggins at pld-linux.org
Thu Aug 16 12:05:18 CEST 2012
commit a584c5c50b5aaf31e440b03f62b91cde4540d487
Author: Jan Rękorajski <baggins at pld-linux.org>
Date: Thu Aug 16 12:00:51 2012 +0200
Th snapshot support
Added configs and installation procedure for Th snapshots,
if poldek is built with snap then default Th sources are disabled
and snapshot and its possible updates are set as main sources.
poldek-debuginfo-snap.conf | 24 ++++++++++++++++++++++++
poldek-multilib-snap.conf | 41 +++++++++++++++++++++++++++++++++++++++++
poldek-snap.conf | 40 ++++++++++++++++++++++++++++++++++++++++
poldek.conf | 4 ++++
poldek.spec | 21 +++++++++++++++++++++
5 files changed, 130 insertions(+)
---
diff --git a/poldek.spec b/poldek.spec
index cf6ef31..863ed41 100644
--- a/poldek.spec
+++ b/poldek.spec
@@ -5,6 +5,10 @@
%bcond_without python # don't build python bindings
%bcond_with snap # don't build python bindings
+%if %{with snap}
+%define SNAP 2012
+%endif
+
# required versions (forced to avoid SEGV with mixed db used by rpm and poldek)
%define ver_db 4.7.25
%define ver_db_rel 1
@@ -32,6 +36,9 @@ Source8: %{name}-debuginfo.conf
Source9: %{name}-aidath.conf
Source10: %{name}-multilib-aidath.conf
Source11: %{name}-archive.conf
+Source100: %{name}-snap.conf
+Source101: %{name}-multilib-snap.conf
+Source102: %{name}-debuginfo-snap.conf
Patch0: %{name}-vserver-packages.patch
Patch1: %{name}-config.patch
Patch2: %{name}-size-type.patch
@@ -304,6 +311,20 @@ sed -e 's|%%ARCH%%|%{_ftp_arch}|g' < %{pld_debuginfo_conf} > $RPM_BUILD_ROOT%{_s
sed -e 's|%%ARCH%%|%{_ftp_arch}|g' < %{pld_archive_conf} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-archive.conf
%endif
+%if %{with snap}
+sed -e 's|%%ARCH%%|%{_ftp_arch}|g' \
+ -e 's|%%SNAP%%|%{SNAP}|g' < %{SOURCE100} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}.conf
+sed -e 's|%%ARCH%%|%{_ftp_arch}|g' \
+ -e 's|%%SNAP%%|%{SNAP}|g' < %{SOURCE102} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-debuginfo.conf
+%ifarch %{x8664}
+ sed -e 's|%%ARCH%%|%{_ftp_alt_arch}|g' \
+ -e 's|%%SNAP%%|%{SNAP}|g' < %{SOURCE101} > $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld-%{SNAP}-multilib.conf
+%endif
+sed -i -e 's|@@SNAP@@||g' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld.conf
+%else
+sed -i '/@@SNAP@@.*/d' $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/repos.d/pld.conf
+%endif
+
cp -p %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}/%{name}/cli.conf
%if %{with imode}
diff --git a/poldek-debuginfo-snap.conf b/poldek-debuginfo-snap.conf
new file mode 100644
index 0000000..86c0693
--- /dev/null
+++ b/poldek-debuginfo-snap.conf
@@ -0,0 +1,24 @@
+# Debuginfo repositories for PLD Linux 3.0 (Th)
+_arch = %ARCH%
+_snap = %SNAP%
+_prefix = ftp://ftp.th.pld-linux.org/dists/th/%{_snap}
+## Some mirrors
+## You can use them if you have better connection there
+# CI TASK:
+#_prefix = ftp://ftp.task.pld-linux.org/dists/th
+
+_type = pndir
+
+[source]
+type = %{_type}
+name = th-%{_snap}-debuginfo
+path = %{_prefix}/PLD/%{_arch}/debuginfo/
+auto = no
+autoup = no
+
+[source]
+type = %{_type}
+name = th-%{_snap}-updates-debuginfo
+path = %{_prefix}/updates/%{_arch}/debuginfo/
+auto = no
+autoup = no
diff --git a/poldek-multilib-snap.conf b/poldek-multilib-snap.conf
new file mode 100644
index 0000000..e277d39
--- /dev/null
+++ b/poldek-multilib-snap.conf
@@ -0,0 +1,41 @@
+# $Id$
+# PLD Linux Distribution <http://www.pld-linux.org/>.
+#
+# Alternative multilib sources for PLD Linux 3.0 (Th)
+
+_arch = %ARCH%
+_snap = %SNAP%
+_pld_main_prefix = ftp://ftp.th.pld-linux.org/dists/th/%{_snap}
+
+## Some mirrors
+## You can use them if you have better connection there
+# CI TASK:
+#_prefix = ftp://ftp.task.pld-linux.org/dists/th/%{_snap}
+_prefix = %{_pld_main_prefix}
+
+# group source for referring th+th-multiarch sources together, i.e poldek --sn th-all
+[source]
+type = group
+name = th-%{_snap}-all
+sources = th-%{_snap} th-%{_snap}-%{_arch}
+
+[source]
+type = group
+name = th-%{_snap}-all-updates
+sources = th-%{_snap}-updates th-%{_snap}-%{_arch}-updates
+
+[source]
+type = pndir
+name = th-%{_snap}-%{_arch}
+path = %{_prefix}/PLD/%{_arch}/RPMS/
+ignore = kernel-*
+auto = no
+autoup = no
+
+[source]
+type = pndir
+name = th-%{_snap}-%{_arch}-updates
+path = %{_pld_main_prefix}/updates/%{_arch}/RPMS/
+ignore = kernel-*
+auto = no
+autoup = no
diff --git a/poldek-snap.conf b/poldek-snap.conf
new file mode 100644
index 0000000..cfb321b
--- /dev/null
+++ b/poldek-snap.conf
@@ -0,0 +1,40 @@
+# PLD Linux Distribution <http://www.pld-linux.org/>.
+#
+# Main sources for PLD Linux 3.0 (Th) %SNAP%
+
+# specify our packages architecture
+_arch = %ARCH%
+
+# Th snapshot name
+_snap = %SNAP%
+
+# main PLD-site for often changed things:
+_pld_main_prefix = ftp://ftp.th.pld-linux.org/dists/th/%{_snap}
+
+## Some mirrors
+## You can use them if you have better connection there
+# CI TASK:
+#_prefix = ftp://ftp.task.pld-linux.org/dists/th/%{_snap}
+_prefix = %{_pld_main_prefix}
+
+# PLD Linux 3.0 (Th): main sources
+[source]
+type = pndir
+name = th-%{_snap}
+path = %{_prefix}/PLD/%{_arch}/RPMS/
+
+[source]
+type = pndir
+name = th-%{_snap}
+path = %{_prefix}/PLD/noarch/RPMS/
+
+# PLD Linux 3.0 (Th) %SNAP%: updates
+[source]
+type = pndir
+name = th-%{_snap}-updates
+path = %{_pld_main_prefix}/updates/%{_arch}/RPMS/
+
+[source]
+type = pndir
+name = th-%{_snap}-updates
+path = %{_pld_main_prefix}/updates/noarch/RPMS/
diff --git a/poldek.conf b/poldek.conf
index ed32eb3..bc51835 100644
--- a/poldek.conf
+++ b/poldek.conf
@@ -19,11 +19,15 @@ _prefix = %{_pld_main_prefix}
type = pndir
name = th
path = %{_prefix}/PLD/%{_arch}/RPMS/
+@@SNAP@@auto = no
+@@SNAP@@autoup = no
[source]
type = pndir
name = th
path = %{_prefix}/PLD/noarch/RPMS/
+@@SNAP@@auto = no
+@@SNAP@@autoup = no
# PLD Linux 3.0 (Th): obsolete sources (kde3, ...)
[source]
More information about the pld-cvs-commit
mailing list