# Created by Tobias Powalowski <tpowa@archlinux.org>

install ()
{
    MODULES=""
    BINARIES="pacman"
    FILES=""
    SCRIPT=""

DEPENDS="initscripts wget bash coreutils cryptsetup dialog \
e2fsprogs findutils gawk grep iputils jfsutils less lvm2 mdadm module-init-tools nano \
ncurses net-tools gnu-netcat ntfsprogs pcmciautils procps psmisc reiserfsprogs sed snarf \
syslog-ng sysvinit tar util-linux-ng which wireless_tools xfsprogs dnsutils hdparm memtest86+ \
inetutils openssh hwdetect shadow bridge-utils ifenslave cpufrequtils links tcp_wrappers \
dosfstools udev initscripts filesystem kernel26 glibc linux-api-headers xinetd links pacman \
pacman-mirrorlist screen kbd pam dhcpcd bzip2 gcc-libs openssl zlib elfutils gpm sysfsutils \
libgcrypt libgpg-error popt kexec-tools ppp libpcap rp-pppoe lilo iptables capi4k-utils \
ntfs-3g isdn4k-utils pciutils usbutils vpnc openvpn b43-fwcutter wpa_supplicant gzip rsync \
libarchive device-mapper cracklib nfs-utils nfsidmap readline acl attr pcre cpio archboot \
fuse libusb-compat vim vim-runtime lzo2 libsasl libldap libevent gpm sdparm pptpclient licenses \
ndiswrapper ndiswrapper-utils zd1211-firmware smbclient tiacx tiacx-firmware dmraid \
linux-atm netcfg parted tzdata ntp v86d iw crda wireless-regdb libnl iproute2 dhclient \
syslinux mtools perl gmp heimdal sqlite3 db dbus-core libcap fsarchiver xz librpcsecgss \
libtirpc wipe ddrescue testdisk clamav ifplugd libdaemon wpa_actiond rfkill libgssglue gdisk \
btrfs-progs-unstable nilfs-utils linux-firmware ipw2100-fw ipw2200-fw iana-etc chntpw libusb \
grub2-bios grub2-common grub2-efi-i386 grub2-efi-x86_64 efibootmgr"


for i in $DEPENDS; do
	for k in  $(echo /var/lib/pacman/local/$i-[0-9]*-[0-9]*); do
		add_file "$k/depends"
		add_file "$k/files"
		add_file "$k/desc"
	done
done
add_dir "/var/log"
add_file "/usr/share/archboot/pacman/etc/pacman.conf" "/etc/pacman.conf"
add_file "/usr/share/archboot/pacman/etc/pacman.d/mirrorlist" "/etc/pacman.d/mirrorlist"
}

help ()
{
cat<<HELPEOF
  This hook includes the pacman on an arch boot image.
HELPEOF
}
