#!/bin/bash ## src2pkg script for: shadow ## Auto-generated by src2pkg-2.1 ## src2pkg - Copyright 2005-2009 Gilbert Ashley SOURCE_NAME='shadow-4.1.4.2.tar.xz' NAME='shadow' # Use ALT_NAME to override guessed value VERSION='4.1.4.2' # Use ALT_VERSION to override guessed value # ARCH='' BUILD='2' # add ALLOW_EMPTY_FILES=YES # PRE_FIX='usr' # Any extra options go here: EXTRA_CONFIGS="--sysconfdir=/etc \ --disable-shared --without-libcrack" # --enable-utmpx # defaults to 'no' ALLOW_EMPTY_FILES=YES ADD_HOST=YES DOCLIST='README COPYING NEWS' # fix the path to the conf file to not use the debianized path /etc/default/adduser # But, note that adduser will still create /etc/default for temp files # PATCHLIST='shadow-patches/shadow-adduser-conf.diff' # Or use: 'shadow-patches/shadow-adduser-default-group.diff' # for a less invasive patch which just fixes the wrong # default group (from 1000 to 100) and sets CREATE_MAIL_SPOOL=no PATCHLIST='shadow-patches/shadow-adduser-default-group.diff' # Optional function replaces configure_source, compile_source, fake_install # To use, uncomment and write/paste CODE between the {} brackets. # build() { CODE } # Get the functions and configs . /usr/libexec/src2pkg/FUNCTIONS ; # Execute the named packaging steps: pre_process find_source make_dirs unpack_source fix_source_perms configure_source # compile_source # If used, the 'build' function replaces these 3 fake_install # rm -f $PKG_DIR/bin/groups find $PKG_DIR -name groups.1 -exec rm {} \; # Add sulogin to the package: cp -a $SRC_DIR/src/sulogin $PKG_DIR/sbin ( cd $PKG_DIR/bin ; ln -s ../sbin/sulogin ) rm -f $PKG_DIR/etc/login.defs cat $SRC_DIR/etc/login.defs > $PKG_DIR/etc/login.defs.new # cat $SRC_DIR/etc/login.access > $PKG_DIR/etc/login.access.new mv $PKG_DIR/etc/login.access $PKG_DIR/etc/login.access.new # dont clobber existing /etc/default/useradd mv $PKG_DIR/etc/default/useradd $PKG_DIR/etc/default/useradd.new cat $PATCHES_DIR/shadow-patches/adduser > $PKG_DIR/usr/sbin/adduser rm -f $PKG_DIR/etc/limits # Add the empty faillog log file: mkdir -p $PKG_DIR/var/log touch $PKG_DIR/var/log/faillog.new # Put some stuff back in "old" locations and make symlinks for compat ( cd $PKG_DIR/usr/bin mv faillog ../sbin mv lastlog ../sbin ln -s ../sbin/faillog ln -s ../sbin/lastlog ) fix_pkg_perms # Fixup a few permissions: chmod 4711 $PKG_DIR/bin/su chmod 4711 $PKG_DIR/usr/bin/* strip_bins create_docs compress_man_pages make_description make_doinst make_package post_process ## See the documentation for more help and examples. Below are some of # the most common Extras and Options for easy cut-and-paste use. # DOCLIST='' PATCHLIST='' INSTALL_TYPE='' # CONFIG_COMMAND='' MAKE_COMMAND='' INSTALL_LINE='' # When editing src2pkg scripts to add custom code, use these variables # to refer to the current directory, the sources or the package tree: # $CWD (current directory), $SRC_DIR (sources), $PKG_DIR (package tree) # Other commonly-used directories include: $DOC_DIR (document directory) # $MAN_DIR (man-page directory) $DATA_DIR (shared-data directory)