⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 buildpkg

📁 开源备份软件源码 AMANDA, the Advanced Maryland Automatic Network Disk Archiver, is a backup system that a
💻
字号:
#! /bin/bashset -x#### Configure variables.  Feel free to change these, but be careful!SRCDIR=$(pwd)# You can pass your own temp directory as an environment variable.if [ -z $TMPDIR ]then    TMPDIR="/tmp/buildpkg.deb"fi# This prefix is prepended to all directories during "make install" FAKEROOT="${TMPDIR}/froot"# Configure and Compilation directory.BUILDDIR="${TMPDIR}/build"# Config variables to mirror those in RPM .spec fileamanda_user=amandabackupamanda_group=adminudpportrange="700,740"tcpportrange="11000,11040"low_tcpportrange="700,710"PREFIX="/usr"EPREFIX="${PREFIX}"BINDIR="${EPREFIX}/bin"SBINDIR="${EPREFIX}/sbin"LIBEXECDIR="${EPREFIX}/lib/amanda"DATADIR="${PREFIX}/share"SYSCONFDIR="/etc"LOCALSTATEDIR="/var"AMANDAHOMEDIR="${LOCALSTATEDIR}/lib/amanda"LIBDIR="${EPREFIX}/lib"INCLUDEDIR="${PREFIX}/include"INFODIR="${PREFIX}/info"MANDIR="${DATADIR}/man"LOGDIR="${LOCALSTATEDIR}/log/amanda"                  #### CHECKSif [ ! -f common-src/amanda.h ]then    echo "'buildpkg' must be run from the root of an otherwise unused amanda source directory." >&2    exit 1fiif [ ! -f configure ]then    echo "The source directory has not been autogen'd -- please download a source distribution tarball or run ./autogen."    echo "You will need autoconf, automake, and libtool to run autogen (but not to compile from a distribution tarball)."    exit 1fiif [ -z $AMVER ]then    AMVER=amanda-2.6.0p1fiif [ -z $AMTARBALL ]then    AMTARBALL=$AMVER.tar.gzfi#### Build functionsdo_build() {    echo "Running configure"    ./configure --quiet \        --prefix=${PREFIX} \        --bindir=${BINDIR} \        --sbindir=${SBINDIR} \        --mandir=${MANDIR} \        --libexecdir=${LIBEXECDIR} \        --sysconfdir=${SYSCONFDIR} \        --localstatedir=${LOCALSTATEDIR} \        --with-star=/bin/star \        --with-gnutar=/bin/tar \        --with-gnutar-listdir=${AMANDAHOMEDIR}/gnutar-lists \        --with-index-server=localhost \        --with-tape-server=localhost \        --with-user=${amanda_user} \        --with-group=${amanda_group} \        --with-owner=${amanda_user} \        --with-fqdn \        --with-bsd-security \        --with-bsdtcp-security \        --with-bsdudp-security \        --with-amandahosts \        --with-smbclient=/usr/bin/smbclient \        --with-ssh-security \        --with-udpportrange=${udpportrange} \        --with-tcpportrange=${tcpportrange} \        --with-low-tcpportrange=${low_tcpportrange} \        --with-debugging=${LOGDIR} \        --disable-installperms \        --enable-s3-device \        --with-assertions \	|| exit 1}do_resources() {    # Setup directories and files as dpkg-buildpkg expects.    if [ -d debian ]; then        rm -rf debian    fi    cp -Rf packaging/deb debian    if [ -d $AMVER ]; then        rm -rf $AMVER    fi    mkdir $AMVER    cp -Rfp * $AMVER}do_package() {    echo "Building package"    cd $AMVER    # Create unsigned packages    dpkg-buildpackage -rfakeroot -uc -us}do_all() {    do_build $1    do_resources $1    do_package $1}do_resourcesdo_package

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -