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

📄 spcaview.slackbuild

📁 a tool use the webcam in linux.
💻 SLACKBUILD
字号:
#!/bin/sh## Slackware SlackBuild Script# ---------------------------## Written by:  Marco A. Frias B. <marcoantoniofrias@gmail.com># Script for:  spcaview# Description: SDL video recorder and viewer with sound# URL:         http://mxhaard.free.fr/## Changelog:## 20061208-1: 16/11/2007 by Marco A. Frias B. <marcoantoniofrias@gmail.com>#             Initial build.## NOTE:#      Run 'sh spcaview.SlackBuild --cleanup' to build a Slackware package.### Include the slackware-package.conf file located in /etcif [ -a /etc/slack-package.conf ]; then. /etc/slack-package.confelseecho "Sorry you need to have the slack-package.conf file to run these"echo "please install the slackbuilds package from LinuxPackages.net"exitfi## The name of the spcaviewNAME=spcaview## The versions for packagesVERSION=20061208## The $MYIN comes from the global config file in /etcBUILD=1$MYINARCH=i486## Path to packagePKG=$TMP/package-$NAME## The area is clean and unarchive the filerm -rf $PKGmkdir -p $PKGcd $TMPrm -rf $NAME-$VERSIONtar xzvf $CWD/$NAME-$VERSION.tar.gz## Fix permissions herechmod -R a-s,u+w,go+r-w $NAME-$VERSIONchown -R root.root $NAME-$VERSION## Determin the CFLAGS based from above settingsOPTIMIZE='-O2'## Get the version of the compilerCC=${CC:-gcc}CC_VER=$( $CC -dumpversion 2> /dev/null )case $ARCH in( i[345]86 ) case $CC_VER in ( [12.* | 3.[0123].* )  SLKCFLAGS="$OPTIMIZE -march=$ARCH -mcpu=i686"  ;; (*)  SLKCFLAGS="$OPTIMIZE -march=$ARCH -mtune=i686"  ;; esac ;;( i686 ) SLKCFLAGS="$OPTIMIZE -march=i686" ;;( x86_64 ) SLKCFLAGS="$OPTIMIZE -fPIC" ;;esac## Setup for parallel buildsNUMCPU=`egrep -c ^cpu[0-9]+ /proc/stat || :`if [ "$NUMCPU" = "0" ]; then NUMCPU=1ficompile() {cd $TMP/$NAME-$VERSION## Patching Makefile filesed -i "s/-O2/$SLKCFLAGS/" Makefilemake -j$NUMCPU || exit 1install -m 0755 -d $PKG/usr/binmake BIN=$PKG/usr/bin install || exit 1}prepare() {cd $TMP/$NAME-$VERSION## Copy docs and compress man pagesPKG_DOC=$PKG/usr/doc/$NAME-$VERSIONDOCFILES="Changelog README readme.avilib"install -m 0755 -d $PKG_DOCfor i in $DOCFILES; doinstall -m 0644 $i $PKG_DOCdonechown -R root.root $PKG_DOC/*## Copy slackbuild filesSLACK_BUILD=$PKG/usr/src/slackbuilds/$NAME-$VERSIONinstall -m 0755 -d $SLACK_BUILDinstall -m 0644 $CWD/$NAME.SlackBuild $SLACK_BUILDinstall -m 0644 $CWD/slack-desc       $SLACK_BUILDchown -R root.root $SLACK_BUILD/*## Cleaning stipping and permissions(cd $PKGstrip_binstrip_libstrip_static)}description() {install -m 0755 -d $PKG/installinstall -m 0644 $CWD/slack-desc $PKG/install}build() {cd $PKG## Generated slack-requiredrequiredbuilder -y -v $PKGecho "gspcav1 >= 20070508-i486-1mfb" >> $PKG/install/slack-requiredcat $PKG/install/slack-required | sort > $PKG/install/slack-required.newmv  $PKG/install/slack-required.new $PKG/install/slack-required## Make the packagemakepkg -l y -c n $PKG_DIR/$NAME-$VERSION-$ARCH-$BUILD.tgz## Give them some feedback after the build.echo "Your $NAME package is complete, make sure you open it up before installing it."echo "It is located in $PKG_DIR thanks for your support The Linuxpackages.net Folks"}## Now we call all those functions in ordercompilepreparedescriptionbuildif [ "$1" = "--cleanup" ]; thenrm -rf $PKGrm -rf $TMP/$NAME-$VERSIONfi

⌨️ 快捷键说明

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