summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--base/pkg-get/.footprint11
-rw-r--r--base/pkg-get/.md5sum4
-rw-r--r--base/pkg-get/Pkgfile29
-rw-r--r--base/pkg-get/pkg-get.conf11
-rw-r--r--base/pkg-get/pkg-get.patch12
-rw-r--r--base/pkg-get/syn33
6 files changed, 100 insertions, 0 deletions
diff --git a/base/pkg-get/.footprint b/base/pkg-get/.footprint
new file mode 100644
index 000000000..a4373f7dc
--- /dev/null
+++ b/base/pkg-get/.footprint
@@ -0,0 +1,11 @@
+drwxr-xr-x root/root etc/
+-rw-r--r-- root/root etc/pkg-get.conf
+drwxr-xr-x root/root usr/
+drwxr-xr-x root/root usr/bin/
+-rwxr-xr-x root/root usr/bin/pkg-get
+-rwxr-xr-x root/root usr/bin/pkg-repgen
+-rwxr-xr-x root/root usr/bin/syn
+drwxr-xr-x root/root usr/man/
+drwxr-xr-x root/root usr/man/man8/
+-rw-r--r-- root/root usr/man/man8/pkg-get.8.gz
+-rw-r--r-- root/root usr/man/man8/pkg-repgen.8.gz
diff --git a/base/pkg-get/.md5sum b/base/pkg-get/.md5sum
new file mode 100644
index 000000000..f012617fc
--- /dev/null
+++ b/base/pkg-get/.md5sum
@@ -0,0 +1,4 @@
+5ee169f2f99fc501387219b6b96ca9ef pkg-get-0.4.5.tar.gz
+8743345d92c1ef62e433b4e76468496e pkg-get.conf
+c3fb4f7ca868903da78d316be77cca16 pkg-get.patch
+cc2b9dcbd4e834b4928839a69d159a9f syn
diff --git a/base/pkg-get/Pkgfile b/base/pkg-get/Pkgfile
new file mode 100644
index 000000000..7fa207258
--- /dev/null
+++ b/base/pkg-get/Pkgfile
@@ -0,0 +1,29 @@
+# Description: Package management tool for CRUX Linux
+# URL: http://www.varlock.com
+# Maintainer: Simone Rota, sip at crux dot nu
+# Packager: Simone Rota, sip at crux dot nu
+# Depends on:
+
+name=pkg-get
+version=0.4.5
+release=3
+source=(http://www.varlock.com/files/$name-$version.tar.gz \
+ $name.patch pkg-get.conf syn)
+
+build() {
+ARCH_=`uname -m`
+ cd $name-$version
+ patch -p1 < ../$name.patch
+ make PREFIX=$PKG/usr CFGDIR=$PKG/etc install
+ install -m 755 ../syn $PKG/usr/bin/syn
+ sed -i "s|CRUX Packages|Paquets NuTyX Architecture $ARCH_|g" $PKG/usr/bin/pkg-repgen
+ sed -i "s|Generated by|Généré par|g" $PKG/usr/bin/pkg-repgen
+ sed -i "s|Port|Nom|" $PKG/usr/bin/pkg-repgen
+ sed -i "s|Last modified|Dernière compilation|" $PKG/usr/bin/pkg-repgen
+ sed -i "s| package| paquet|g" $PKG/usr/bin/pkg-repgen
+ sed -i "s| on | le |" $PKG/usr/bin/pkg-repgen
+install -m644 ../pkg-get.conf $PKG/etc/pkg-get.conf
+sed -i "s/uname-m/$ARCH_/" $PKG/etc/pkg-get.conf
+sed -i "s/uname-m/$ARCH_/" $PKG/usr/bin/syn
+}
+
diff --git a/base/pkg-get/pkg-get.conf b/base/pkg-get/pkg-get.conf
new file mode 100644
index 000000000..ebbff51e3
--- /dev/null
+++ b/base/pkg-get/pkg-get.conf
@@ -0,0 +1,11 @@
+##
+# /etc/pkg-get.conf
+# pkg-get configuration file
+# package repositories (remote)
+# The first two are remote repoistories, the last is a local one
+pkgdir /srv/NuTyX/locale
+pkgdir /srv/NuTyX/test|http://nutyx.meticul.eu/2009/uname-m/test
+pkgdir /srv/NuTyX/release|http://nutyx.meticul.eu/2009/uname-m/release
+# runscripts: if "yes" pre-post install scripts are
+# automatically executed. Handle with care.
+runscripts yes
diff --git a/base/pkg-get/pkg-get.patch b/base/pkg-get/pkg-get.patch
new file mode 100644
index 000000000..a323c6427
--- /dev/null
+++ b/base/pkg-get/pkg-get.patch
@@ -0,0 +1,12 @@
+diff -Nru pkg-get-0.4.5.orig/scripts/pkg-get.pl pkg-get-0.4.5/scripts/pkg-get.pl
+--- pkg-get-0.4.5.orig/scripts/pkg-get.pl 2006-07-13 05:04:11.000000000 +0200
++++ pkg-get-0.4.5/scripts/pkg-get.pl 2006-07-17 13:01:37.524719500 +0200
+@@ -943,7 +943,7 @@
+ printf("%-19s %-19s %-19s\n\n","Package","Installed","Available in the repositories");
+ $gotdiff = 1;
+ }
+- printf("%-19s %-19s %-19s %-19s\n", $pkg{'name'}, $pkg{'instversion'}, $pkg{'version'}."-".$pkg{'release'});
++ printf("%-19s %-19s %-19s\n", $pkg{'name'}, $pkg{'instversion'}, $pkg{'version'}."-".$pkg{'release'});
+ } elsif ($all) { # yeah, it blows, at least avoid to read the locked state twice.
+ if ($gotdiff == 0){
+ print "Differences between installed packages and packages repo:\n\n";
diff --git a/base/pkg-get/syn b/base/pkg-get/syn
new file mode 100644
index 000000000..c4bdeb1fe
--- /dev/null
+++ b/base/pkg-get/syn
@@ -0,0 +1,33 @@
+#!/bin/bash
+MediaDepot=/media/cdrom/depot
+Depot=/srv/NuTyX
+if [ ! "$EUID" -eq 0 ]; then
+ echo "Seul le compte root peut synchroniser les ports NuTyX"
+ exit 1
+fi
+if [ ! -L /depot ]; then
+ pushd $Depot/locale > /dev/null
+ pkg-repgen
+ popd
+ for i in test stable
+ do
+ if [ -d $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
+ echo "Dépot $i trouvé sur le media"
+ rm -r $Depot/$i > /dev/null 2>&1
+ ln -svf $MediaDepot/$i $Depot/ > /dev/null
+ 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/2009/uname-m/$i/ $Depot/$i/
+ done
+fi
+