#!/bin/bash ## src2pkg script for: udev ## Auto-generated by src2pkg-2.1 ## src2pkg - Copyright 2005-2009 Gilbert Ashley # adapetd from the udev.SlackBuild # see the end of this file for Copyright and License info SOURCE_NAME='udev-153.tar.xz' NAME='udev' # Use ALT_NAME to override guessed value VERSION='153' # Use ALT_VERSION to override guessed value # ARCH='' # BUILD='2' # rebuilt against glib2-2.19.10 BUILD='2' # fix faulty pkg-desc # PRE_FIX='usr' # Any extra options go here: EXTRA_CONFIGS="--sysconfdir=/etc --exec-prefix=/ \ --sbindir=/sbin --libexecdir=/lib/udev \ --libdir=/lib${LIBDIRSUFFIX} \ --with-rootlibdir=/lib${LIBDIRSUFFIX} \ --with-pci-ids-path=/lib/ --mandir=$mandir \ --disable-introspection" # unless disable-extras is passed, BuildRequire:gperf PATCHLIST='udev-patches/rule_generator.diff udev-patches/udev-fix-rule-names.diff' # don't add rc routine to rc.local AUTO_RC_LOCAL=NO # unless you configure with '--disable-extras' # this package will have the following depends: ADD_REQS='acl,attr,glib2,libusb,pciutils' # hid2hci,mobile-action-switch > libusb # udev-acl > acl,glib2,attr # pciutils and libusb needed for build # 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 # # We're not using ConsoleKit so leave this out rm -rf $PKG_DIR/usr/lib/ConsoleKit # If it were left, then we'd want to use the doinst.sh.ConsoleKit # scsi_id and vol_id are needed by multipath ( cd $PKG_DIR/sbin ln -s ../lib/udev/scsi_id scsi_id # since 142, udev depends on libblkid from util-linux-ng # instead of vol_id. Must be util-linux-ng >= 2.15 # ln -s ../lib/udev/vol_id vol_id ) mkdir -p \ $PKG_DIR/etc/modprobe.d \ $PKG_DIR/etc/rc.d \ $PKG_DIR/etc/udev/rules.d \ $PKG_DIR/lib/firmware # Yes, these will clobber existing config files. cp -a $PATCHES_DIR/$NAME-patches/config/udev.conf $PKG_DIR/etc/udev/udev.conf # Copy custom rules cp -a $PATCHES_DIR/$NAME-patches/config/rules.d/* $PKG_DIR/lib/udev/rules.d/ # Now the init script and module-init-tools stuff cp -a $PATCHES_DIR/$NAME-patches/config/rc.d/rc.udev.new $PKG_DIR/etc/rc.d/rc.udev.new cp -a $PATCHES_DIR/$NAME-patches/config/modprobe.d/* $PKG_DIR/etc/modprobe.d chown -R root:root $PKG_DIR/etc find $PKG_DIR/etc -type f -exec chmod 644 {} \; find $PKG_DIR/etc -type d -exec chmod 755 {} \; chmod 755 $PKG_DIR/etc/rc.d/rc.udev.new # Add extra device nodes to the package that udev doesn't make: mkdir -p $PKG_DIR/lib/udev/devices ( cd $PKG_DIR/lib/udev/devices tar xf $PATCHES_DIR/$NAME-patches/fixed-devices.tar.gz ) # Add various helper scripts: for FILE in $PATCHES_DIR/$NAME-patches/config/scripts/* ; do cp -a $FILE $PKG_DIR/lib/udev/ done chown -R root:root $PKG_DIR/lib/udev chmod 755 $PKG_DIR/lib/udev/* fix_pkg_perms strip_bins create_docs compress_man_pages make_description make_doinst make_package post_process # Original Copyright: # Copyright 2006, 2008, 2009 Patrick J. Volkerding, Sebeka, Minnesota, USA # All rights reserved. # # Redistribution and use of this script, with or without modification, is # permitted provided that the following conditions are met: # # 1. Redistributions of this script must retain the above copyright # notice, this list of conditions and the following disclaimer. # # THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR IMPLIED # WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF # MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO # EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, # SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, # PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; # OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, # WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR # OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF # ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.