101 lines
3.4 KiB
Bash
101 lines
3.4 KiB
Bash
#!/bin/sh
|
|
#
|
|
# Copyright (C) 2025 Luis Guzman <ark@switnet.org>
|
|
# Copyright (C) 2009-2017 Ruben Rodriguez <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
|
|
#
|
|
|
|
VERSION=4.8
|
|
EXTERNAL='deb-src http://ftp.debian.org/debian trixie main'
|
|
REPOKEY=78DBA3BC47EF2265
|
|
NETINST=true
|
|
. ./config
|
|
|
|
find debian -name apt-mirror-setup.templates-ubuntu | xargs -r rm
|
|
|
|
# Remove multiarch support
|
|
#sed '/chroot/,$d' generators/01setup -i
|
|
|
|
# use patch to remove non-free-firmware, non-free, contrib
|
|
apply_patch_changes
|
|
|
|
#Ubuntu legacy (udeb)
|
|
/bin/sed '/canonical/d;
|
|
/Canonical/d;
|
|
s/main restricted universe multiverse/main/g;
|
|
s/dists restricted/dists/g;
|
|
s/archive.ubuntu.com/archive.trisquel.org/g;
|
|
s/security.ubuntu.com/archive.trisquel.org/g;
|
|
s/ports.ubuntu.com/archive.trisquel.org/g;
|
|
s/Ubuntu/Trisquel/g;
|
|
s/ubuntu/trisquel/g;
|
|
s/universe/main/g;
|
|
s/main main/main/g;
|
|
s:help.trisquel.com/community/UpgradeNotes:trisquel.info/wiki/:g;' generators/* -i
|
|
|
|
#Debian current (udeb)
|
|
/bin/sed '/previously on backports.debian.org/d;
|
|
/# To determine if non-free/,/done/d;
|
|
s/dists non-free/dists/g;
|
|
s/dists contrib/dists/g;
|
|
s/Debian/Trisquel/g;
|
|
s/debian/trisquel/g;' generators/* -i
|
|
|
|
#Ubuntu legacy (udeb)
|
|
replace "Default: /ubuntu" "Default: /trisquel" .
|
|
replace "security.ubuntu.com" "archive.trisquel.org" .
|
|
replace "archive.ubuntu.com" "archive.trisquel.org" .
|
|
replace "Ubuntu" "Trisquel" .
|
|
|
|
#Debian current (udeb)
|
|
replace "Default: /debian" "Default: /trisquel" .
|
|
replace "security.debian.org" "archive.trisquel.org" .
|
|
replace "deb.debian.org" "archive.trisquel.org" .
|
|
replace "Debian" "Trisquel" .
|
|
|
|
mkdir release-files
|
|
cd release-files
|
|
rm -rf *
|
|
for DIST in $CODENAME $CODENAME-security $CODENAME-updates $CODENAME-backports
|
|
do
|
|
wget -r -l1 -np http://archive.trisquel.org/trisquel/dists/$DIST
|
|
done
|
|
find archive.trisquel.org/ |egrep '(index.html|robots.txt)'|xargs rm
|
|
cd ..
|
|
|
|
rm generators/9[1-9]* generators/50mirror
|
|
find generators -name 50mirror.ubuntu | xargs -r rm
|
|
sed -i '/generators\/9[1-9]*/d' debian/apt-setup-udeb.install
|
|
|
|
cat << EOF >> debian/apt-setup-udeb.install
|
|
finish-install.d/99deb822-breadcrumb-trim usr/lib/finish-install.d
|
|
EOF
|
|
|
|
cat << EOF > debian/apt-mirror-setup.install
|
|
generators/50mirror.trisquel usr/lib/apt-setup/generators
|
|
generators/99deb822-breadcrumb usr/lib/apt-setup/generators
|
|
release-files/archive.trisquel.org usr/share/apt-setup/release-files
|
|
EOF
|
|
|
|
cp $DATA/50mirror.trisquel generators/
|
|
cp $DATA/99deb822-breadcrumb generators/
|
|
cp $DATA/99deb822-breadcrumb-trim finish-install.d/
|
|
|
|
#sed '/The partner/,/^*/d; s/services-select-ubuntu/services-select-trisquel/' -i debian/apt-setup-udeb.templates
|
|
sed 's/services-select/services-select-trisquel/' -i debian/apt-setup-udeb.templates
|
|
|
|
changelog "Rebranded and adapted for Trisquel"
|
|
package
|