make-base-files 3.82 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 22 23

. ./config

24
CODENAMECAPS=$(echo $CODENAME | /bin/sed -e "s/\b\(.\)/\u\1/g")
25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 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

cat << EOF > debian/update-motd.d/01-banner
#!/bin/sh
echo "\
   ___        ___               ___        ___       ___        ___        ___
  /\  \      /\  \      ___    /\  \      /\  \     /\__\      /\  \      /\__\\\\
  \ \  \    /  \  \    /\  \  /  \  \    /  \  \   / /  /     /  \  \    / /  /
   \ \  \  / /\ \  \   \ \  \/ /\ \  \  / /\ \  \ / /  /     / /\ \  \  / /  /
   /  \  \/  \ \ \  \  /  \__\ \ \ \  \/ /  \ \  \ /  /  ___/  \ \ \  \/ /  /
  / /\ \__\/\ \ \ \__\/ /\/__/\ \ \ \__\/__/ \ \__\__/  /\__\/\ \ \ \__\/__/
 / /  \/__/_|  \/ /  / /  /\ \ \ \ \/__/\  \ / /  /  \ / /  /\ \ \ \/__/\  \\\\
/ /  /      | |  /  / /__/  \ \ \ \__\ \ \/\/ /  / \  / /  /\ \ \ \__\ \ \  \\\\
\/__/       | |\/__/\ \__\   \ \/ /  /  \    /  / \ \/ /  /  \ \ \/__/  \ \  \\\\
            | |  |   \/__/    \  /  /    \  /  /   \  /  /    \ \__\     \ \__\\\\
             \|__|             \/__/      \/__/     \/__/      \/__/      \/__/
"
EOF

cat << EOF > debian/update-motd.d/10-help-text
#!/bin/sh
echo "Welcome to Trisquel GNU/Linux"
echo "Documentation: http://trisquel.info/wiki/"
EOF

chmod 755 debian/update-motd.d/*

cat << EOF > etc/legal

  The programs included with the Trisquel GNU/Linux system are free software.
  The exact distribution terms for each program are described in the individual
  files in /usr/share/doc/*/copyright.

  Trisquel GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent permitted
  by applicable law.

EOF

cat << EOF >> share/dot.bashrc
# Trisquel aliases for root
if [ "$TERM" != "dumb" ] && [ -x /usr/bin/dircolors ]; then
    eval "`dircolors -b`"
    alias ls='ls --color=auto'
    alias ll='ls -lh'
    alias la='ls -A'
    alias l='ls -CF'
    alias dir='ls --color=auto --format=vertical'
    alias vdir='ls --color=auto --format=long'

    alias grep='grep --color=auto'
    alias egrep='egrep --color=auto'
    alias fgrep='fgrep --color=auto'
    
    alias rm='rm -i'
    [ -f /usr/bin/vim ] && alias vi='vim' || alias vi='vim.tiny'
    [ -f /usr/bin/vim ] || alias vim='vim.tiny'
fi
EOF

cat > etc/issue <<EOF
84
Trisquel GNU/Linux $REVISION \n \l
85 86 87 88

EOF

cat > etc/issue.net <<EOF
89
Trisquel GNU/Linux $REVISION
90 91 92 93
EOF

cat > etc/lsb-release <<EOF
DISTRIB_ID=Trisquel
94
DISTRIB_RELEASE=$REVISION
95
DISTRIB_CODENAME=$CODENAME
96 97 98 99 100 101 102 103 104 105 106 107 108
DISTRIB_DESCRIPTION="Trisquel GNU/Linux $REVISION, $CODENAMECAPS"
EOF

cat > etc/os-release <<EOF
NAME="Trisquel GNU/Linux"
VERSION="$REVISION, $CODENAMECAPS"
ID=trisquel
ID_LIKE=debian
PRETTY_NAME="Trisquel GNU/Linux $CODENAMECAPS ($REVISION)"
VERSION_ID="$REVISION"
HOME_URL="https://trisquel.info/"
SUPPORT_URL="https://trisquel.info/wiki"
BUG_REPORT_URL="https://trisquel.info/project/issues"
109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126
EOF

cat << EOF > origins/trisquel
Vendor: Trisquel
Vendor-URL: http://trisquel.info/
Bugs: http://trisquel.info/project/issues
Parent: Ubuntu
EOF

echo /etc/dpkg/origins/trisquel >> debian/conffiles

sed s/ubuntu/trisquel/ -i debian/rules

changelog "Compiled for Trisquel"
sed -i "1s/(\(.*\))/(1:\1)/" debian/changelog

compile