Rename xbps-base-dirs to xbps-base-files.
Install some default configuation files by default, based on Fedora and Archlinux. --HG-- extra : convert_revision : 28a0ac3594338bbd761c8c68559d09d8e9aec54d
This commit is contained in:
parent
2e40a55bb6
commit
f27cf5c2af
16 changed files with 266 additions and 61 deletions
|
@ -32,7 +32,7 @@ subpackages="devel locales"
|
|||
Add_dependency build gcc
|
||||
Add_dependency build gawk
|
||||
Add_dependency build kernel-libc-headers
|
||||
Add_dependency run xbps-base-dirs
|
||||
Add_dependency run xbps-base-files
|
||||
Add_dependency run gcc-libgcc
|
||||
Add_dependency run glibc-locales
|
||||
|
||||
|
|
|
@ -11,7 +11,7 @@ long_desc="
|
|||
noarch=yes
|
||||
base_chroot=yes
|
||||
|
||||
Add_dependency full xbps-base-dirs
|
||||
Add_dependency full xbps-base-files
|
||||
Add_dependency full ncurses
|
||||
Add_dependency full texinfo
|
||||
Add_dependency full gettext
|
||||
|
|
|
@ -1,58 +0,0 @@
|
|||
# Template file for 'xbps-base-dirs'
|
||||
pkgname=xbps-base-dirs
|
||||
version=0.7
|
||||
build_style=custom-install
|
||||
short_desc="xbps base system directories"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
long_desc="
|
||||
This package installs the base system directories as well
|
||||
as some required files for xbps."
|
||||
|
||||
base_chroot=yes
|
||||
noarch=yes
|
||||
|
||||
do_install()
|
||||
{
|
||||
for f in bin sbin boot etc home lib dev proc mnt opt sys var \
|
||||
media/cdrom; do
|
||||
mkdir -p $DESTDIR/$f
|
||||
done
|
||||
|
||||
mkdir -p -m 0750 $DESTDIR/root
|
||||
mkdir -p -m 1777 $DESTDIR/tmp $DESTDIR/var/tmp
|
||||
|
||||
for f in local local/bin local/sbin local/include local/lib \
|
||||
bin include lib sbin src; do
|
||||
mkdir -p $DESTDIR/usr/$f
|
||||
done
|
||||
|
||||
for f in locale misc terminfo zoneinfo doc info; do
|
||||
mkdir -p $DESTDIR/usr/share/$f
|
||||
mkdir -p $DESTDIR/usr/local/share/$f
|
||||
done
|
||||
|
||||
for f in 1 2 3 4 5 6 7 8; do
|
||||
mkdir -p $DESTDIR/usr/share/man/man$f
|
||||
mkdir -p $DESTDIR/usr/local/share/man/man$f
|
||||
done
|
||||
|
||||
cd $DESTDIR/usr && ln -s ./share/man man
|
||||
cd $DESTDIR/usr/local && ln -s ./share/man man
|
||||
|
||||
for f in lock log mail run spool opt cache lib; do
|
||||
mkdir -p $DESTDIR/var/$f
|
||||
done
|
||||
|
||||
if [ "$xbps_machine" = "x86_64" ]; then
|
||||
mkdir -p $DESTDIR/usr/lib
|
||||
mkdir -p $DESTDIR/lib
|
||||
cd $DESTDIR && ln -s lib lib64
|
||||
cd $DESTDIR/usr && ln -s lib lib64
|
||||
fi
|
||||
|
||||
for f in info-files initramfs-tools register-shell xml-catalog \
|
||||
x11-fonts; do
|
||||
install -D -m 755 $XBPS_TRIGGERSDIR/$f \
|
||||
$DESTDIR/var/db/xbps/triggers/$(basename $f)
|
||||
done
|
||||
}
|
40
templates/xbps-base-files/files/colorls.sh
Normal file
40
templates/xbps-base-files/files/colorls.sh
Normal file
|
@ -0,0 +1,40 @@
|
|||
# color-ls initialization
|
||||
|
||||
#when USER_LS_COLORS defined do not override user LS_COLORS, but use them.
|
||||
if [ -z "$USER_LS_COLORS" ]; then
|
||||
|
||||
alias ll='ls -l' 2>/dev/null
|
||||
alias l.='ls -d .*' 2>/dev/null
|
||||
|
||||
|
||||
# Skip the rest for noninteractive shells.
|
||||
[ -z "$PS1" ] && return
|
||||
|
||||
COLORS=
|
||||
|
||||
for colors in "$HOME/.dir_colors.$TERM" "$HOME/.dircolors.$TERM" \
|
||||
"$HOME/.dir_colors" "$HOME/.dircolors"; do
|
||||
[ -e "$colors" ] && COLORS="$colors" && break
|
||||
done
|
||||
|
||||
[ -z "$COLORS" ] && [ -e "/etc/DIR_COLORS.256color" ] && \
|
||||
[ "x`tput colors 2>/dev/null`" = "x256" ] && \
|
||||
COLORS="/etc/DIR_COLORS.256color"
|
||||
|
||||
if [ -z "$COLORS" ]; then
|
||||
for colors in "/etc/DIR_COLORS.$TERM" "/etc/DIR_COLORS" ; do
|
||||
[ -e "$colors" ] && COLORS="$colors" && break
|
||||
done
|
||||
fi
|
||||
|
||||
# Existence of $COLORS already checked above.
|
||||
[ -n "$COLORS" ] || return
|
||||
|
||||
eval `dircolors --sh "$COLORS" 2>/dev/null`
|
||||
[ -z "$LS_COLORS" ] && return
|
||||
egrep -qi "^COLOR.*none" $COLORS >/dev/null 2>/dev/null && return
|
||||
fi
|
||||
|
||||
alias ll='ls -l --color=auto' 2>/dev/null
|
||||
alias l.='ls -d .* --color=auto' 2>/dev/null
|
||||
alias ls='ls --color=auto' 2>/dev/null
|
2
templates/xbps-base-files/files/dot_bash_logout
Normal file
2
templates/xbps-base-files/files/dot_bash_logout
Normal file
|
@ -0,0 +1,2 @@
|
|||
# ~/.bash_logout
|
||||
|
13
templates/xbps-base-files/files/dot_bash_profile
Normal file
13
templates/xbps-base-files/files/dot_bash_profile
Normal file
|
@ -0,0 +1,13 @@
|
|||
# .bash_profile
|
||||
|
||||
# Get the aliases and functions
|
||||
if [ -f ~/.bashrc ]; then
|
||||
. ~/.bashrc
|
||||
fi
|
||||
|
||||
# User specific environment and startup programs
|
||||
|
||||
PATH=$PATH:$HOME/bin
|
||||
PS1="[\u@\h \W]$ "
|
||||
|
||||
export PATH PS1
|
8
templates/xbps-base-files/files/dot_bashrc
Normal file
8
templates/xbps-base-files/files/dot_bashrc
Normal file
|
@ -0,0 +1,8 @@
|
|||
# .bashrc
|
||||
|
||||
# Source global definitions
|
||||
if [ -f /etc/bashrc ]; then
|
||||
. /etc/bashrc
|
||||
fi
|
||||
|
||||
# User specific aliases and functions
|
8
templates/xbps-base-files/files/host.conf
Normal file
8
templates/xbps-base-files/files/host.conf
Normal file
|
@ -0,0 +1,8 @@
|
|||
#
|
||||
# /etc/host.conf
|
||||
#
|
||||
|
||||
order hosts,bind
|
||||
multi on
|
||||
|
||||
# End of file
|
8
templates/xbps-base-files/files/hosts
Normal file
8
templates/xbps-base-files/files/hosts
Normal file
|
@ -0,0 +1,8 @@
|
|||
#
|
||||
# /etc/hosts: static lookup table for host names
|
||||
#
|
||||
|
||||
#<ip-address> <hostname.domain.org> <hostname>
|
||||
127.0.0.1 localhost.localdomain localhost
|
||||
|
||||
# End of file
|
60
templates/xbps-base-files/files/profile
Normal file
60
templates/xbps-base-files/files/profile
Normal file
|
@ -0,0 +1,60 @@
|
|||
# /etc/profile
|
||||
|
||||
# System wide environment and startup programs, for login setup
|
||||
# Functions and aliases go in /etc/bashrc
|
||||
|
||||
pathmunge () {
|
||||
if ! echo $PATH | /usr/bin/egrep -q "(^|:)$1($|:)" ; then
|
||||
if [ "$2" = "after" ] ; then
|
||||
PATH=$PATH:$1
|
||||
else
|
||||
PATH=$1:$PATH
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# ksh workaround
|
||||
if [ -z "$EUID" -a -x /bin/id ]; then
|
||||
EUID=`id -u`
|
||||
UID=`id -ru`
|
||||
fi
|
||||
|
||||
# Path manipulation
|
||||
if [ "$EUID" = "0" ]; then
|
||||
pathmunge /sbin
|
||||
pathmunge /usr/sbin
|
||||
pathmunge /usr/local/sbin
|
||||
else
|
||||
pathmunge /usr/local/sbin after
|
||||
pathmunge /usr/sbin after
|
||||
pathmunge /sbin after
|
||||
fi
|
||||
|
||||
# No core files by default
|
||||
ulimit -S -c 0 > /dev/null 2>&1
|
||||
|
||||
if [ -x /bin/id ]; then
|
||||
USER="`id -un`"
|
||||
LOGNAME=$USER
|
||||
MAIL="/var/spool/mail/$USER"
|
||||
fi
|
||||
|
||||
HOSTNAME=`/bin/hostname 2>/dev/null`
|
||||
HISTSIZE=1000
|
||||
|
||||
export PATH USER LOGNAME MAIL HOSTNAME HISTSIZE
|
||||
|
||||
for i in /etc/profile.d/*.sh ; do
|
||||
if [ -r "$i" ]; then
|
||||
if [ "$PS1" ]; then
|
||||
. $i
|
||||
else
|
||||
. $i >/dev/null 2>&1
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
export PATH
|
||||
|
||||
unset i
|
||||
unset pathmunge
|
23
templates/xbps-base-files/files/securetty
Normal file
23
templates/xbps-base-files/files/securetty
Normal file
|
@ -0,0 +1,23 @@
|
|||
console
|
||||
vc/1
|
||||
vc/2
|
||||
vc/3
|
||||
vc/4
|
||||
vc/5
|
||||
vc/6
|
||||
vc/7
|
||||
vc/8
|
||||
vc/9
|
||||
vc/10
|
||||
vc/11
|
||||
tty1
|
||||
tty2
|
||||
tty3
|
||||
tty4
|
||||
tty5
|
||||
tty6
|
||||
tty7
|
||||
tty8
|
||||
tty9
|
||||
tty10
|
||||
tty11
|
5
templates/xbps-base-files/files/usb-load-ehci-first
Normal file
5
templates/xbps-base-files/files/usb-load-ehci-first
Normal file
|
@ -0,0 +1,5 @@
|
|||
#
|
||||
# Load the EHCI driver before OHCI or UHCI, to avoid a warning.
|
||||
#
|
||||
install ohci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe --ignore-install ohci_hcd $CMDLINE_OPTS
|
||||
install uhci_hcd /sbin/modprobe ehci_hcd ; /sbin/modprobe --ignore-install uhci_hcd $CMDLINE_OPTS
|
6
templates/xbps-base-files/files/vim.sh
Normal file
6
templates/xbps-base-files/files/vim.sh
Normal file
|
@ -0,0 +1,6 @@
|
|||
if [ -n "$BASH_VERSION" -o -n "$KSH_VERSION" -o -n "$ZSH_VERSION" ]; then
|
||||
[ -x //usr/bin/id ] || return
|
||||
[ `//usr/bin/id -u` -le 100 ] && return
|
||||
# for bash and zsh, only if no alias is already set
|
||||
alias vi >/dev/null 2>&1 || alias vi=vim
|
||||
fi
|
4
templates/xbps-base-files/files/which2.sh
Normal file
4
templates/xbps-base-files/files/which2.sh
Normal file
|
@ -0,0 +1,4 @@
|
|||
# Initialization script for bash and sh
|
||||
|
||||
# export AFS if you are in AFS environment
|
||||
alias which='alias | /usr/bin/which --tty-only --read-alias --show-dot --show-tilde'
|
86
templates/xbps-base-files/template
Normal file
86
templates/xbps-base-files/template
Normal file
|
@ -0,0 +1,86 @@
|
|||
# Template file for 'xbps-base-files'
|
||||
pkgname=xbps-base-files
|
||||
version=0.8
|
||||
build_style=custom-install
|
||||
short_desc="xbps base system files"
|
||||
maintainer="Juan RP <xtraeme@gmail.com>"
|
||||
long_desc="
|
||||
This package installs the base system files and directories that
|
||||
aren't installed by any other package and are required on any
|
||||
GNU/Linux system."
|
||||
|
||||
base_chroot=yes
|
||||
noarch=yes
|
||||
|
||||
conf_files="/etc/profile /etc/hosts /etc/host.conf /etc/securetty
|
||||
/etc/skel/.bash_profile /etc/skel/.bash_logout /etc/skel/.bashrc"
|
||||
|
||||
do_install()
|
||||
{
|
||||
#
|
||||
# Install FHS system directories.
|
||||
#
|
||||
for d in bin sbin boot etc home lib dev proc mnt opt sys var \
|
||||
media; do
|
||||
install -d ${DESTDIR}/${d}
|
||||
done
|
||||
|
||||
install -d -m750 ${DESTDIR}/root
|
||||
for d in tmp var/tmp var/lock var/spool/mail; do
|
||||
install -d -m1777 ${DESTDIR}/${d}
|
||||
done
|
||||
|
||||
for d in local local/bin local/sbin local/include local/lib \
|
||||
bin include lib sbin src; do
|
||||
install -d ${DESTDIR}/usr/${d}
|
||||
done
|
||||
|
||||
for d in locale misc terminfo zoneinfo doc info; do
|
||||
install -d ${DESTDIR}/usr/share/${d}
|
||||
install -d ${DESTDIR}/usr/local/share/${d}
|
||||
done
|
||||
|
||||
for f in 1 2 3 4 5 6 7 8; do
|
||||
install -d ${DESTDIR}/usr/share/man/man${d}
|
||||
install -d ${DESTDIR}/usr/local/share/man/man${d}
|
||||
done
|
||||
|
||||
cd ${DESTDIR}/usr && ln -s ./share/man man
|
||||
cd ${DESTDIR}/usr/local && ln -s ./share/man man
|
||||
|
||||
for d in log run opt cache lib; do
|
||||
install -d ${DESTDIR}/var/${d}
|
||||
done
|
||||
|
||||
if [ "$xbps_machine" = "x86_64" ]; then
|
||||
install -d ${DESTDIR}/usr/lib
|
||||
install -d ${DESTDIR}/lib
|
||||
cd ${DESTDIR} && ln -s lib lib64
|
||||
cd ${DESTDIR}/usr && ln -s lib lib64
|
||||
fi
|
||||
|
||||
#
|
||||
# Install trigger files.
|
||||
#
|
||||
install -d ${DESTDIR}/var/db/xbps/triggers
|
||||
install -m755 ${XBPS_TRIGGERSDIR}/* ${DESTDIR}/var/db/xbps/triggers
|
||||
|
||||
#
|
||||
# Install misc config files.
|
||||
#
|
||||
for f in bash_logout bash_profile bashrc; do
|
||||
install -D -m644 ${FILESDIR}/dot_${f} ${DESTDIR}/etc/skel/.${f}
|
||||
done
|
||||
|
||||
install -m644 ${FILESDIR}/profile ${DESTDIR}/etc
|
||||
install -m600 ${FILESDIR}/securetty ${DESTDIR}/etc
|
||||
install -m644 ${FILESDIR}/hosts ${DESTDIR}/etc
|
||||
install -m644 ${FILESDIR}/host.conf ${DESTDIR}/etc
|
||||
|
||||
install -d ${DESTDIR}/etc/profile.d
|
||||
install -m644 ${FILESDIR}/*.sh ${DESTDIR}/etc/profile.d
|
||||
|
||||
install -d ${DESTDIR}/etc/modprobe.d
|
||||
install -D -m644 ${FILESDIR}/usb-load-ehci-first \
|
||||
${DESTDIR}/etc/modprobe.d
|
||||
}
|
|
@ -10,7 +10,7 @@ long_desc="
|
|||
|
||||
noarch=yes
|
||||
|
||||
Add_dependency full xbps-base-dirs
|
||||
Add_dependency full xbps-base-files
|
||||
Add_dependency full texinfo
|
||||
Add_dependency full coreutils
|
||||
Add_dependency full dash
|
||||
|
|
Loading…
Reference in a new issue