74 lines
2.1 KiB
Python
74 lines
2.1 KiB
Python
# -*- mode: python; coding: utf-8 -*-
|
|
|
|
include("mode/space")
|
|
header()
|
|
|
|
# Recherche de la distribution
|
|
distros = [x.split("=", 1)[1] for x in metadata.groups if x.startswith("debian-version=")]
|
|
if len(distros) == 0:
|
|
raise Exception("aucune distribution définie")
|
|
elif len(distros) > 1:
|
|
raise Exception("plusieurs distrubutions définient")
|
|
else:
|
|
[distro] = distros
|
|
|
|
# Dépôt
|
|
if has("debian-mirror"):
|
|
repo = "file:/mirror"
|
|
else:
|
|
repo = "ftp://mirror.adm.crans.org"
|
|
|
|
def source(args):
|
|
print "deb " + args
|
|
print "deb-src " + args
|
|
|
|
if has("ovh"):
|
|
source("ftp://mir1.ovh.net/debian/ %s main contrib" % distro)
|
|
source("http://security.debian.org/ %s/updates main" % distro)
|
|
|
|
@# Paquet construit a la main
|
|
source("ftp://mirror.adm.crans.org/custom ./")
|
|
|
|
elif has("debian-lenny"):
|
|
prefix = ""
|
|
source("ftp://mirror.adm.crans.org/debian/ lenny main contrib")
|
|
source("http://security.debian.org/ lenny/updates main")
|
|
source("ftp://mirror.adm.crans.org/custom/ ./")
|
|
|
|
if has("o2"):
|
|
prefix = ""
|
|
@# Avant-premières des paquets ocsigen
|
|
source("http://ocsigen.org/debian/ lenny main contrib")
|
|
|
|
else:
|
|
# Pour les mises a jour de sécurité on utilise pas de mirroir...
|
|
if has("adm-only"):
|
|
# ... sauf si le serveur ne voit pas le reste du monde ...
|
|
prefix = "ftp://mirror.adm.crans.org/"
|
|
source("debian-security etch/updates main")
|
|
else:
|
|
prefix = "ftp://security.debian.org/"
|
|
source("debian-security etch/updates main")
|
|
|
|
if has("debian-mirror"):
|
|
prefix = "file:/mirror/"
|
|
else:
|
|
prefix = "ftp://mirror.adm.crans.org/"
|
|
|
|
source("debian etch main contrib")
|
|
|
|
# Pour quand ça sera fait:
|
|
# if has("need-volatile"):
|
|
source("debian-volatile etch/volatile main contrib")
|
|
|
|
if has("2B"):
|
|
@# Mplayer...
|
|
source("debian-multimedia etch main")
|
|
|
|
@# Paquets construits à la main
|
|
source("custom ./")
|
|
|
|
if has("rouge"):
|
|
prefix = ""
|
|
@# Backports pour dovecot
|
|
source("http://www.backports.org/backports.org/ etch-backports main contrib")
|