make-apt 4.14 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
#!/bin/sh
#
#    Copyright (C) 2008-2010  Rubén Rodríguez <ruben@trisquel.info>
#
#    This program is free software; you can redistribute it and/or modify
#    it under the terms of the GNU General Public License as published by
#    the Free Software Foundation; either version 2 of the License, or
#    (at your option) any later version.
#
#    This program is distributed in the hope that it will be useful,
#    but WITHOUT ANY WARRANTY; without even the implied warranty of
#    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
#    GNU General Public License for more details.
#
#    You should have received a copy of the GNU General Public License
#    along with this program; if not, write to the Free Software
#    Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA  02110-1301 USA
#

20
VERSION=3
21
COMPONENT=main
22 23 24 25

. ./config

cp $DATA/trisquel-archive.gpg share
26
rm share/ubuntu-archive.gpg
27
replace "http://archive.ubuntu.com/ubuntu/project/ubuntu-archive-keyring.gpg" "http://archive.trisquel.info/trisquel/trisquel-archive-signkey.gpg" .
28
replace ubuntu-keyring trisquel-keyring .
29
replace ubuntu-archive-keyring trisquel-archive-keyring .
30 31

sed '/VERSION/s/ubuntu/trisquel/' -i configure
32

33
# remove non-free examples https://trisquel.info/en/issues/5518
34 35 36 37 38 39 40 41 42
sed '/non-free/d' -i ./test/integration/Packages-ubuntu-bug-614993 ./test/integration/status-ubuntu-bug-614993
replace "contrib main non-free" main .
replace "contrib non-free" main .
replace "main contrib non-free" main .
replace "contrib main" main .
replace "contrib" main test

sed "s/'main', 'contrib', 'non-free'/'main'/" -i ./dselect/setup

43 44
replace contrib universe doc
replace contrib universe po
45
replace non-free main .
46

47 48 49 50 51 52 53 54 55
# Ubuntu link to changelogs https://trisquel.info/en/issues/9967 
replace "http://changelogs.ubuntu.com/changelogs" "http://packages.trisquel.info/changelogs" .
sed 's!http://changelogs.ubuntu.com/changelogs!http://packages.trisquel.info/changelogs!' -i debian/apt.conf.changelog

#Ubuntu references in the doc
#replace Ubuntu Trisquel .
#replace ubuntu-archive-keyring .
#replace ubuntu-archive-removed-keys .

56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103
cat << EOF > ./test/interactive-helper/networkless-install-fixes/sources.test.list
deb http://archive.trisquel.info/trisquel/ $CODENAME main
deb-src http://archive.trisquel.info/trisquel/ $CODENAME main
deb http://archive.trisquel.info/trisquel/ $CODENAME-updates main
deb-src http://archive.trisquel.info/trisquel/ $CODENAME-updates main
deb http://archive.trisquel.info/trisquel/ $CODENAME-security main
deb-src http://archive.trisquel.info/trisquel/ $CODENAME-security main
EOF

cp ./test/interactive-helper/networkless-install-fixes/sources.test.list ./doc/examples/sources.list

cat << EOF > ./doc/examples/apt-ftparchive.conf
// This config is for use with the pool-structure for the packages, thus we
// don't use a Tree Section in here

// The debian archive should be in the current working dir
Dir {   
        ArchiveDir ".";
        CacheDir ".";
};

// Create Packages, Packages.gz and Packages.bz2, remove what you don't need
Default {
        Packages::Compress ". gzip bzip2";
        Sources::Compress ". gzip bzip2";
        Contents::Compress ". gzip bzip2";
};

// Includes the main section. You can structure the directory tree under
// ./pool/main any way you like, apt-ftparchive will take any deb (and
// source package) it can find. This creates a Packages a Sources and a
// Contents file for these in the main section of the sid release
BinDirectory "pool/main" {
        Packages "dists/$CODENAME/main/binary-i386/Packages";
        Sources "dists/$CODENAME/main/source/Sources";
        Contents "dists/$CODENAME/Contents-i386";
}

// By default all Packages should have the extension ".deb"
Default {
        Packages {
                Extensions ".deb";
        };
};
EOF
## end non-free examples


104
/bin/sed -i 's_http://archive.ubuntu.com/ubuntu/project/_http://archive.trisquel.info/trisquel/_g; s/ubuntu-archive-keyring/trisquel-archive-keyring/g; s/ubuntu-keyring/trisquel-keyring/g; ' cmdline/apt-key.in debian/control*
Ruben Rodriguez committed
105 106
replace Ubuntu Trisquel  methods/http.cc
replace ubuntu-archive.gpg trisquel-archive.gpg .
107 108 109 110 111

changelog "Ubuntu keyring replaced with Trisquel's"

compile