#!/bin/sh ## Advanced.PkgBuild script for: crafty for /opt ## ## Amigo PkgBuild-0.3 - Gilbert Ashley ## ##### ------------Standard Package Variables------------------- # Most source code only needs these 4 variables set. # Set SRC_SUFFIX to ".tar.gz" ".tgz" ".tar.bz2" or ".tbz" BUILD="1opt" NAME="crafty" VERSION="20.1afx" SRC_SUFFIX=".tar.bz2" #####--------Common Overrides and Options---------------------- # PRE_FIX="/opt/crafty-20.1" # EXTRA_CONFIGS="" # DOCLIST="" # GROUP_NAME="" #######----------------Processing------------------------------ # Get functions and read in configuration files source /usr/share/Amigo/PkgBuild/FUNCTIONS ; # This template calls each process individually so you can add # extra instructions between processes, or even leave out steps. pre_process ; find_source ; make_dirs ; unpack_source ; fix_source_perms ; # configure_source ; # compile_source ; # fake_install ; cd $SRC_DIR && make linux # Use an /opt-sytle common directory mkdir -p $PKG_DIR/opt/crafty-20.1 cp -a $SRC_DIR/crafty $PKG_DIR/opt/crafty-20.1/Crafty # install a wrapper in /usr/bin - I prefer this to creating # a link for stuff that install to /opt mkdir -p $PKG_DIR/usr/bin cp -a $CWD/Resources/crafty.wrapper $PKG_DIR/usr/bin/crafty chown root.root $PKG_DIR/usr/bin/crafty chmod 755 $PKG_DIR/usr/bin/crafty # install the common files cp -a $SRC_DIR/*.bin $PKG_DIR/opt/crafty-20.1 cp -a $SRC_DIR/bitmaps $PKG_DIR/opt/crafty-20.1 cp -a $SRC_DIR/sound $PKG_DIR/opt/crafty-20.1 # change /opt/chess to /opt/crafty-20.1 cp -a $CWD/Resources/speak-opt.amigo $PKG_DIR/opt/crafty-20.1/speak # install a default rc file cp -a $CWD/Resources/crafty.rc $PKG_DIR/opt/crafty-20.1 mkdir -p $PKG_DIR/usr/man/man1 cp -a $SRC_DIR/crafty.man $PKG_DIR/usr/man/man1/crafty.1 mkdir -p $PKG_DIR/usr/doc/crafty-20.1 cp $SRC_DIR/crafty.doc.ascii $PKG_DIR/usr/doc/crafty-20.1/crafty.txt cp $SRC_DIR/crafty.hlp $PKG_DIR/usr/doc/crafty-20.1/crafty.hlp fix_pkg_perms ; strip_bins ; # create_docs ; compress_man_pages ; make_description ; make_doinst ; make_package ; post_process ; exit 0 ## See the Amigo PkgBuild documentation for help and examples.