summaryrefslogtreecommitdiffstats
path: root/extra/pkg-repgen
diff options
context:
space:
mode:
authortnut <tnut at nutyx dot com>2011-10-16 15:11:27 +0200
committertnut <tnut at nutyx dot com>2011-10-16 15:11:27 +0200
commit256643d1bdc082873038ebb8a68189e6f5b36c6d (patch)
treeff521838cc0d834eac06c2d9d826f64258222eaf /extra/pkg-repgen
parente9b52d6fd215ed1b762853a53a67a351d7d3f5d0 (diff)
downloadnutyx-extra-256643d1bdc082873038ebb8a68189e6f5b36c6d.tar.gz
nutyx-extra-256643d1bdc082873038ebb8a68189e6f5b36c6d.tar.bz2
nutyx-extra-256643d1bdc082873038ebb8a68189e6f5b36c6d.tar.xz
nutyx-extra-256643d1bdc082873038ebb8a68189e6f5b36c6d.zip
pkg-repgen dans extra
Diffstat (limited to 'extra/pkg-repgen')
-rw-r--r--extra/pkg-repgen/.footprint.i6868
-rw-r--r--extra/pkg-repgen/.footprint.x86_648
-rw-r--r--extra/pkg-repgen/.md5sum.i6861
-rw-r--r--extra/pkg-repgen/.md5sum.x86_641
-rw-r--r--extra/pkg-repgen/Pkgfile24
-rw-r--r--extra/pkg-repgen/pkg-get.conf11
-rw-r--r--extra/pkg-repgen/syn58
7 files changed, 111 insertions, 0 deletions
diff --git a/extra/pkg-repgen/.footprint.i686 b/extra/pkg-repgen/.footprint.i686
new file mode 100644
index 000000000..ad97a7979
--- /dev/null
+++ b/extra/pkg-repgen/.footprint.i686
@@ -0,0 +1,8 @@
+drwxr-xr-x root/root etc/
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/pkg-repgen
+drwxr-xr-x root/root usr/share/
+drwxr-xr-x root/root usr/share/man/
+drwxr-xr-x root/root usr/share/man/man8/
+-rw-r--r-- root/root usr/share/man/man8/pkg-repgen.8.gz
diff --git a/extra/pkg-repgen/.footprint.x86_64 b/extra/pkg-repgen/.footprint.x86_64
new file mode 100644
index 000000000..ad97a7979
--- /dev/null
+++ b/extra/pkg-repgen/.footprint.x86_64
@@ -0,0 +1,8 @@
+drwxr-xr-x root/root etc/
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/pkg-repgen
+drwxr-xr-x root/root usr/share/
+drwxr-xr-x root/root usr/share/man/
+drwxr-xr-x root/root usr/share/man/man8/
+-rw-r--r-- root/root usr/share/man/man8/pkg-repgen.8.gz
diff --git a/extra/pkg-repgen/.md5sum.i686 b/extra/pkg-repgen/.md5sum.i686
new file mode 100644
index 000000000..94160a452
--- /dev/null
+++ b/extra/pkg-repgen/.md5sum.i686
@@ -0,0 +1 @@
+4255529e512555b8759dc939305b708c pkg-get-0.5.2.tar.gz
diff --git a/extra/pkg-repgen/.md5sum.x86_64 b/extra/pkg-repgen/.md5sum.x86_64
new file mode 100644
index 000000000..94160a452
--- /dev/null
+++ b/extra/pkg-repgen/.md5sum.x86_64
@@ -0,0 +1 @@
+4255529e512555b8759dc939305b708c pkg-get-0.5.2.tar.gz
diff --git a/extra/pkg-repgen/Pkgfile b/extra/pkg-repgen/Pkgfile
new file mode 100644
index 000000000..8aa333fe5
--- /dev/null
+++ b/extra/pkg-repgen/Pkgfile
@@ -0,0 +1,24 @@
+# Description: Outil de gestion de paquets binaires pour NuTyX
+# URL: http://www.varlock.com et nutyx.org
+# Maintainer: thierryn1 at hispeed dot ch
+# Packager: thierryn1 at hispeed dot ch
+
+name=pkg-repgen
+version=0.5.2
+release=1
+source=(http://nutyx.meticul.eu/files/pkg-get-$version.tar.gz)
+
+build() {
+ARCH_=`uname -m`
+ cd pkg-get-$version
+ make PREFIX=$PKG/usr CFGDIR=$PKG/etc install
+ mkdir -p $PKG/usr/share
+ mv $PKG/usr/{man,share/man}
+ rm $PKG/etc/pkg-get.conf
+ rm $PKG/usr/bin/pkg-get
+ rm $PKG/usr/share/man/man8/pkg-get.8
+ if [ "$ARCH_" == "x86_64" ]; then
+ sed -i "s/i686/x86_64/" $PKG/usr/bin/pkg-repgen
+ fi
+}
+
diff --git a/extra/pkg-repgen/pkg-get.conf b/extra/pkg-repgen/pkg-get.conf
new file mode 100644
index 000000000..06c0e5944
--- /dev/null
+++ b/extra/pkg-repgen/pkg-get.conf
@@ -0,0 +1,11 @@
+###
+# /etc/pkg-get.conf
+#
+# pkg-get configuration file
+# Dépot des paquets NuTyX
+# Activez le dépot test pour profiter des mise à jour test
+# pkgdir /srv/NuTyX/test|http://nutyx.meticul.eu/pakxe/uname-m/test
+pkgdir /srv/NuTyX/release|http://nutyx.meticul.eu/pakxe/uname-m/release
+# runscripts: if "yes" pre-post install scripts are
+# automatically executed. Handle with care.
+runscripts yes
diff --git a/extra/pkg-repgen/syn b/extra/pkg-repgen/syn
new file mode 100644
index 000000000..d29fcd6f7
--- /dev/null
+++ b/extra/pkg-repgen/syn
@@ -0,0 +1,58 @@
+#!/bin/bash
+MediaDepot=/media/cdrom/depot
+Depot=/srv/NuTyX
+find_cd() {
+EXPECT_LABEL="nutyxcd"
+let PKGNB=0
+for SYS in /sys/block/sd* /sys/block/sr* ; do
+ if [ ! -d "$SYS" ]; then continue; fi
+ DEV=/dev/${SYS##*/}
+ LABEL=`dd if=$DEV bs=1 skip=32808 count=32 2>/dev/null`
+ if [ $LABEL == $EXPECT_LABEL ] 2>/dev/null ; then
+ mkdir -p /media/cdrom 2>/dev/null
+ mount $DEV /media/cdrom
+ if [ ! -d /media/cdrom/depot ]; then
+ umount -n /media/cdrom
+ fi
+ break
+ fi
+done
+}
+if [ ! "$EUID" -eq 0 ]; then
+ echo "Seul le compte root peut synchroniser les ports NuTyX"
+ exit 1
+fi
+if ! mountpoint /media/cdrom > /dev/null; then
+ find_cd
+fi
+if [ ! -L /depot ]; then
+ for i in `cat /etc/pkg-get.conf |grep -v ^#|grep http|cut -d "|" -f 1|cut -d" " -f2|cut -d"/" -f4`
+ do
+ if [ -a $Depot/$i ]; then
+ rm -r $Depot/$i
+ fi
+ done
+ pkg-get sync
+ for i in `cat /etc/pkg-get.conf |grep -v ^#|grep http|cut -d "|" -f 1|cut -d" " -f2|cut -d"/" -f4`
+ do
+ if [ -d $MediaDepot/$i ]; then
+ rm -r $Depot/$i > /dev/null 2>&1
+ mkdir -p $Depot/$i
+ for j in $MediaDepot/$i/*.xz
+ do
+ let PKGNB=$PKGNB+1
+
+ fj=`basename $j`
+ ln -sf $MediaDepot/$i/$fj $Depot/$i/$fj
+ echo -n -e "$PKGNB Paquets trouvés sur le média\r"
+ done
+ echo "$PKGNB Paquets trouvés sur le média"
+ cp $MediaDepot/$i/PKG* $Depot/$i/
+ fi
+ done
+else
+ for i in `cat /etc/pkg-get.conf |grep -v ^#|grep http|cut -d "|" -f 1|cut -d" " -f2|cut -d"/" -f4`
+ do
+ rsync -avuz --delete-before rsync://nutyx.meticul.eu/nutyx/attapu/i686/$i/ $Depot/$i/
+ done
+fi