From 98d4181c97a3dd43b86aa03b1d409f7671eabd18 Mon Sep 17 00:00:00 2001 From: Ivan Rako Date: Tue, 18 Sep 2007 13:27:15 +0000 Subject: [PATCH] r1: [svn-inject] Installing original source of apt-cn --- README.CARNet | 10 +++++ changelog.CARNet | 45 ++++++++++++++++++++++ debian/changelog | 1 + debian/compat | 1 + debian/control | 14 +++++++ debian/dirs | 1 + debian/docs | 2 + debian/install | 1 + debian/postinst | 45 ++++++++++++++++++++++ debian/rules | 86 +++++++++++++++++++++++++++++++++++++++++++ install-carnet-sources.list | 16 ++++++++ sources.list | 11 ++++++ 12 files changed, 233 insertions(+) create mode 100644 README.CARNet create mode 100644 changelog.CARNet create mode 120000 debian/changelog create mode 100644 debian/compat create mode 100644 debian/control create mode 100644 debian/dirs create mode 100644 debian/docs create mode 100644 debian/install create mode 100755 debian/postinst create mode 100755 debian/rules create mode 100755 install-carnet-sources.list create mode 100644 sources.list diff --git a/README.CARNet b/README.CARNet new file mode 100644 index 0000000..18d94c1 --- /dev/null +++ b/README.CARNet @@ -0,0 +1,10 @@ +apt-cn ++----+ + +Paket donosi ispravan popis repozitorija paketa za CARNet Debian 3.0. + +Ako zelite koristiti samo sources.list preporucen od CARNeta, pokrenite: + +# install-carnet-sources.list + + -- Ivan Rako Tue, 18 Sep 2007 15:12:12 +0200 diff --git a/changelog.CARNet b/changelog.CARNet new file mode 100644 index 0000000..40520bc --- /dev/null +++ b/changelog.CARNet @@ -0,0 +1,45 @@ +apt-cn (3.0.0) sarge; urgency=low + + * Prva verzija za Etch + + -- Ivan Rako Tue, 18 Sep 2007 15:15:10 +0200 + +apt-cn (2.1.5) sarge; urgency=low + + * provjera u postinstu da li postoji non-US, ako postoji javi da + je zastario + * dodan apt-get update prilikom izmjene sources.list u skripti + install-carnet-sources.list + + -- Ivan 'ico' Rako Fri, 2 Sep 2005 17:41:44 +0100 + +apt-cn (2.1.4) sarge; urgency=low + + * izbacen non-US dio (postinst + examples) jer se vise ne koristi + + -- Ivan 'ico' Rako Tue, 30 Aug 2005 18:05:40 +0200 + +apt-cn (2.1.3) sarge; urgency=low + + * ispravka skripte 'install-carnet-sources.list' + + -- Ivan 'ico' Rako Thu, 25 Aug 2005 20:58:05 +0200 + +apt-cn (2.1.2) sarge; urgency=low + + * dodana ovisnost o carnet-tools-cn + + -- Ivan 'ico' Rako Mon, 13 Jun 2005 19:53:48 +0200 + +apt-cn (2.1.1) sarge; urgency=low + + * izmjena adrese repozitorija CARNetovih paketa + * dolazi skripta 'install-carnet-sources.list' + + -- Ivan 'ico' Rako Fri, 3 Jun 2005 09:38:11 +0200 + +apt-cn (2.1) sarge; urgency=low + + * inicijalna verzija + + -- Ivan 'ico' Rako Wed, 11 May 2005 17:27:30 +0200 diff --git a/debian/changelog b/debian/changelog new file mode 120000 index 0000000..dbf0845 --- /dev/null +++ b/debian/changelog @@ -0,0 +1 @@ +../changelog.CARNet \ No newline at end of file diff --git a/debian/compat b/debian/compat new file mode 100644 index 0000000..b8626c4 --- /dev/null +++ b/debian/compat @@ -0,0 +1 @@ +4 diff --git a/debian/control b/debian/control new file mode 100644 index 0000000..fc4d748 --- /dev/null +++ b/debian/control @@ -0,0 +1,14 @@ +Source: apt-cn +Section: net +Priority: optional +Maintainer: Ivan Rako +Build-Depends: debhelper (>= 4.0.0) +Standards-Version: 3.6.1 + +Package: apt-cn +Architecture: all +Depends: ntp, ntpdate, ntp-server +Description: Network Time Protocol: server and utilities + NTP, the Network Time Protocol, is used to keep computer clocks accurate + over the Internet, or by following an accurate hardware receiver which + interprets GPS, DCF-77, NIST or similar time signals. diff --git a/debian/dirs b/debian/dirs new file mode 100644 index 0000000..236670a --- /dev/null +++ b/debian/dirs @@ -0,0 +1 @@ +usr/sbin diff --git a/debian/docs b/debian/docs new file mode 100644 index 0000000..d92e2d1 --- /dev/null +++ b/debian/docs @@ -0,0 +1,2 @@ +README.CARNet +changelog.CARNet diff --git a/debian/install b/debian/install new file mode 100644 index 0000000..c4aea47 --- /dev/null +++ b/debian/install @@ -0,0 +1 @@ +install-carnet-sources.list usr/sbin diff --git a/debian/postinst b/debian/postinst new file mode 100755 index 0000000..34fdaec --- /dev/null +++ b/debian/postinst @@ -0,0 +1,45 @@ +#!/bin/sh + +set -e + +[ "$1" = "configure" ] || exit 0 + +repos_regexp=" +^deb .*tp://security.debian.org etch/updates main contrib non-free +^deb .*tp://ftp.carnet.hr/.*debian etch main contrib non-free +^deb .*tp://ftp.carnet.hr/carnet-debian etch main non-free" + +repos=" +1 deb http://security.debian.org etch/updates main contrib non-free +2 deb http://ftp.carnet.hr/debian etch main contrib non-free +3 deb http://ftp.carnet.hr/carnet-debian etch main non-free" + +notneeded_repos_regexp="^deb.*tp://.*debian-non-US" + +IFS=" +" + +counter=1 +for i in $repos_regexp; do + if ! grep -q "$i" /etc/apt/sources.list; then + needed="$needed $counter" + fi + counter=$(($counter + 1)) +done + +if grep -q "$notneeded_repos_regexp" /etc/apt/sources.list; then + echo "CN: Following repositories are obsolete:" + grep "$notneeded_repos_regexp" /etc/apt/sources.list + echo "" +fi + +if [ ! -z "$needed" ]; then + echo "CN: Following repositories are not found in your sources list:" + IFS=" " + for i in $needed; do + echo $repos | grep ^$i | cut -c3-300 + done + echo "" + echo "CN: You can add the above to /etc/apt/sources.list or just:" + echo "CN: # install-carnet-sources.list" +fi diff --git a/debian/rules b/debian/rules new file mode 100755 index 0000000..e72f0b9 --- /dev/null +++ b/debian/rules @@ -0,0 +1,86 @@ +#!/usr/bin/make -f +# -*- makefile -*- +# Sample debian/rules that uses debhelper. +# This file was originally written by Joey Hess and Craig Small. +# As a special exception, when this file is copied by dh-make into a +# dh-make output file, you may use that output file without restriction. +# This special exception was added by Craig Small in version 0.37 of dh-make. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +configure: configure-stamp +configure-stamp: + dh_testdir + # Add here commands to configure the package. + + touch configure-stamp + + +build: build-stamp + +build-stamp: configure-stamp + dh_testdir + + # Add here commands to compile the package. + # $(MAKE) + + touch build-stamp + +clean: + dh_testdir + dh_testroot + rm -f build-stamp configure-stamp + + # Add here commands to clean up after the build process. + # -$(MAKE) clean + + dh_clean + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/apt-cn. + # $(MAKE) install DESTDIR=$(CURDIR)/debian/apt-cn + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + dh_testdir + dh_testroot +# dh_installchangelogs -k + dh_installdocs +# dh_installexamples + dh_install +# dh_installmenu +# dh_installdebconf +# dh_installlogrotate +# dh_installemacsen +# dh_installpam +# dh_installmime +# dh_installinit +# dh_installcron +# dh_installinfo + dh_installman +# dh_link +# dh_strip +# dh_compress + dh_fixperms +# dh_perl +# dh_python +# dh_makeshlibs + dh_installdeb +# dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install configure diff --git a/install-carnet-sources.list b/install-carnet-sources.list new file mode 100755 index 0000000..2b2eb31 --- /dev/null +++ b/install-carnet-sources.list @@ -0,0 +1,16 @@ +#!/bin/sh + +if ! cmp -s /usr/share/doc/apt-cn/sources.list /etc/apt/sources.list; then + . /usr/share/carnet-tools/functions.sh + echo "CN: Backing up old /etc/apt/sources.list to /var/backups/." + echo "CN: Installing new /etc/apt/sources.list." + echo "" + cp_backup_conffile /etc/apt/sources.list + cp /usr/share/doc/apt-cn/sources.list /etc/apt/sources.list + apt-get update +else + echo "CN: Valid CARNet's /etc/apt/sources.list already exists." + echo "CN: Nothing to do." + echo "" +fi + diff --git a/sources.list b/sources.list new file mode 100644 index 0000000..92949ed --- /dev/null +++ b/sources.list @@ -0,0 +1,11 @@ +# See sources.list(5) for more information, especialy +# Remember that you can only use http, ftp or file URIs +# CDROMs are managed through the apt-cdrom tool. +deb http://ftp.carnet.hr/debian etch main contrib non-free +deb http://security.debian.org etch/updates main contrib non-free + +# CARNet Debian Linux v3 +deb http://ftp.carnet.hr/carnet-debian etch main non-free + +# Uncomment if you want the apt-get source function to work +#deb-src http://ftp.carnet.hr/debian etch main contrib non-free -- 1.7.10.4