mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-20 19:41:34 +01:00
games/wmwebcam: Added (Webcam DockApp).
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
This commit is contained in:
parent
f6f36aee29
commit
3dd1e6dea6
5 changed files with 194 additions and 0 deletions
10
desktop/wmwebcam/README
Normal file
10
desktop/wmwebcam/README
Normal file
|
@ -0,0 +1,10 @@
|
|||
wmwebcam is a dockapp that grabs an image from your webcam every second and displays the captured
|
||||
image. Original written years ago, it was updated by eukara to work with the newer V4L2. Credits go to
|
||||
him for the fix.
|
||||
|
||||
You can customize the device location, webcam delay, and size. However, this must be done in the source
|
||||
before compile. To make this easier a patch is included, just open it in your favorite editor, read the
|
||||
comments, and edit the variables to your liking (make sure it's the lines with the "+" in front).
|
||||
|
||||
There is also a default perl script that can upload the captured images to a FTP, this is also
|
||||
configurable in the patch.
|
63
desktop/wmwebcam/customize.patch
Normal file
63
desktop/wmwebcam/customize.patch
Normal file
|
@ -0,0 +1,63 @@
|
|||
diff -Naur wmwebcam-0.3.5-fixed/Makefile wmwebcam-0.3.5-customize/Makefile
|
||||
--- wmwebcam-0.3.5-fixed/Makefile 2015-06-01 11:40:40.000000000 -0700
|
||||
+++ wmwebcam-0.3.5-customize/Makefile 2015-11-24 02:23:25.695647261 -0700
|
||||
@@ -1,5 +1,5 @@
|
||||
CC = gcc
|
||||
-CFLAGS = -O2 -Wall -I/usr/X11R6/include -DVIDEO_DEV=\"/dev/video0\"
|
||||
+CFLAGS = -O2 -Wall -I/usr/X11R6/include -DVIDEO_DEV=\"/dev/video0\"
|
||||
LDFLAGS =
|
||||
LIBS = -L/usr/X11R6/lib -lX11 -lXext -lm -ljpeg -lv4l1
|
||||
|
||||
diff -Naur wmwebcam-0.3.5-fixed/wmwebcam.c wmwebcam-0.3.5-customize/wmwebcam.c
|
||||
--- wmwebcam-0.3.5-fixed/wmwebcam.c 2015-06-01 11:37:49.000000000 -0700
|
||||
+++ wmwebcam-0.3.5-customize/wmwebcam.c 2015-11-24 02:22:29.172647747 -0700
|
||||
@@ -46,15 +46,15 @@
|
||||
|
||||
//////////////////////// CHANGE THESE IF NECESSARY ///////////////////////////
|
||||
|
||||
-#define DEF_WIDTH 352 // changing these requires adjustements
|
||||
-#define DEF_HEIGHT 288 // to the source, use default if possible
|
||||
+#define DEF_WIDTH 352 // changing these requires adjustements
|
||||
+#define DEF_HEIGHT 288 // to the source, use default if possible
|
||||
|
||||
-#define SENDINGDELAY 60 // default delay between saving jpeg
|
||||
+#define SENDINGDELAY 60 // default delay between saving jpeg
|
||||
// images and scriptrunning (in seconds)
|
||||
|
||||
-#define OUTPUTFILE "/tmp/wmwebcam.jpg" // default output file
|
||||
-#define CUSTOMSCRIPT "wmwebcam.pl" // default custom script
|
||||
-#define QUAL_DEFAULT 100 // default jpeg outputquality
|
||||
+#define OUTPUTFILE "/tmp/wmwebcam.jpg" // default output file
|
||||
+#define CUSTOMSCRIPT "wmwebcam.pl" // default custom script
|
||||
+#define QUAL_DEFAULT 100 // default jpeg outputquality
|
||||
|
||||
//////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
diff -Naur wmwebcam-0.3.5-fixed/wmwebcam.pl wmwebcam-0.3.5-customize/wmwebcam.pl
|
||||
--- wmwebcam-0.3.5-fixed/wmwebcam.pl 2001-01-27 09:24:16.000000000 -0700
|
||||
+++ wmwebcam-0.3.5-customize/wmwebcam.pl 2015-11-24 02:23:01.323647470 -0700
|
||||
@@ -5,12 +5,12 @@
|
||||
|
||||
# check if the ppp is on before stamping&sending, otherwise don't do
|
||||
# anything
|
||||
-$areweonline = `grep "ppp" /proc/net/route`;
|
||||
+$areweonline = `grep "ppp" /proc/net/route`;
|
||||
|
||||
-if (length $areweonline != 0) { # THIS IS JUST MY CONFIGURATION,
|
||||
+if (length $areweonline != 0) { # THIS IS JUST MY CONFIGURATION,
|
||||
# CHANGE TO YOUR OWN
|
||||
|
||||
-system "stamp"; # stamp reads /tmp/wmwebcam.jpg and outputs
|
||||
+system "stamp"; # stamp reads /tmp/wmwebcam.jpg and outputs
|
||||
# /tmp/webcam.jpg with some info (has to be
|
||||
# configured to do so)
|
||||
# get stamp from:
|
||||
@@ -19,7 +19,7 @@
|
||||
# NOTE: stamp has the ability to send the image to server via ftp, but I
|
||||
# prefer using scp.
|
||||
|
||||
-system "scp -q /tmp/webcam.jpg SOME_HOST:public_html/webcam.jpg";
|
||||
+system "scp -q /tmp/webcam.jpg SOME_HOST:public_html/webcam.jpg";
|
||||
# replace the previous line to suit your needs
|
||||
# or disable if you use stamp's own ftpsend
|
||||
} else {
|
19
desktop/wmwebcam/slack-desc
Normal file
19
desktop/wmwebcam/slack-desc
Normal file
|
@ -0,0 +1,19 @@
|
|||
# HOW TO EDIT THIS FILE:
|
||||
# The "handy ruler" below makes it easier to edit a package description.
|
||||
# Line up the first '|' above the ':' following the base package name, and
|
||||
# the '|' on the right side marks the last column you can put a character in.
|
||||
# You must make exactly 11 lines for the formatting to be correct. It's also
|
||||
# customary to leave one space after the ':' except on otherwise blank lines.
|
||||
|
||||
|-----handy-ruler--------------------------------------------------------|
|
||||
wmwebcam: wmwebcam (Webcam DockApp)
|
||||
wmwebcam:
|
||||
wmwebcam: wmwebcam is a dockapp that grabs an image from your webcam every
|
||||
wmwebcam: second and displays the captured image. Original written years ago, it
|
||||
wmwebcam: was updated by eukara to work with the newer V4L2.
|
||||
wmwebcam:
|
||||
wmwebcam: Homepage: http://bloodbathsoftworks.com/eukara/
|
||||
wmwebcam:
|
||||
wmwebcam:
|
||||
wmwebcam:
|
||||
wmwebcam:
|
92
desktop/wmwebcam/wmwebcam.SlackBuild
Normal file
92
desktop/wmwebcam/wmwebcam.SlackBuild
Normal file
|
@ -0,0 +1,92 @@
|
|||
#!/bin/sh
|
||||
|
||||
# Slackware build script for wmwebcam-fixed
|
||||
#
|
||||
# Copyright 2015 Gethyn ThomasQuail <gethyn@bloodbathsoftworks.com>
|
||||
# All rights reserved.
|
||||
#
|
||||
# Based on:
|
||||
# SBo's cmake-template
|
||||
#
|
||||
# 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.
|
||||
|
||||
PRGNAM=wmwebcam
|
||||
VERSION=${VERSION:-0.3.5}
|
||||
BUILD=${BUILD:-1}
|
||||
TAG=${TAG:-_SBo}
|
||||
|
||||
if [ -z "$ARCH" ]; then
|
||||
case "$( uname -m )" in
|
||||
i?86) ARCH=i486 ;;
|
||||
arm*) ARCH=arm ;;
|
||||
*) ARCH=$( uname -m ) ;;
|
||||
esac
|
||||
fi
|
||||
|
||||
CWD=$(pwd)
|
||||
TMP=${TMP:-/tmp/SBo}
|
||||
PKG=$TMP/package-$PRGNAM
|
||||
OUTPUT=${OUTPUT:-/tmp}
|
||||
|
||||
if [ "$ARCH" = "i486" ]; then
|
||||
SLKCFLAGS="-O2 -march=i486 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "i686" ]; then
|
||||
SLKCFLAGS="-O2 -march=i686 -mtune=i686"
|
||||
LIBDIRSUFFIX=""
|
||||
elif [ "$ARCH" = "x86_64" ]; then
|
||||
SLKCFLAGS="-O2 -fPIC"
|
||||
LIBDIRSUFFIX="64"
|
||||
else
|
||||
SLKCFLAGS="-O2"
|
||||
LIBDIRSUFFIX=""
|
||||
fi
|
||||
|
||||
set -e
|
||||
|
||||
rm -rf $PKG
|
||||
mkdir -p $TMP $PKG $OUTPUT
|
||||
cd $TMP
|
||||
rm -rf $PRGNAM-$VERSION-fixed
|
||||
tar xvf $CWD/$PRGNAM-$VERSION-fixed.tar.gz
|
||||
cd $PRGNAM-$VERSION-fixed
|
||||
chown -R root:root .
|
||||
find -L . \
|
||||
\( -perm 777 -o -perm 775 -o -perm 750 -o -perm 711 -o -perm 555 \
|
||||
-o -perm 511 \) -exec chmod 755 {} \; -o \
|
||||
\( -perm 666 -o -perm 664 -o -perm 640 -o -perm 600 -o -perm 444 \
|
||||
-o -perm 440 -o -perm 400 \) -exec chmod 644 {} \;
|
||||
|
||||
# Customization patch
|
||||
patch -p1 < $CWD/customize.patch
|
||||
|
||||
make
|
||||
|
||||
mkdir -p $PKG/usr/bin
|
||||
mv wmwebcam $PKG/usr/bin
|
||||
mv wmwebcam.pl $PKG/usr/bin
|
||||
|
||||
mkdir -p $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cp -a README COPYING Changelog $PKG/usr/doc/$PRGNAM-$VERSION
|
||||
cat $CWD/$PRGNAM.SlackBuild > $PKG/usr/doc/$PRGNAM-$VERSION/$PRGNAM.SlackBuild
|
||||
|
||||
mkdir -p $PKG/install
|
||||
cat $CWD/slack-desc > $PKG/install/slack-desc
|
||||
|
||||
cd $PKG
|
||||
/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$VERSION-$ARCH-$BUILD$TAG.${PKGTYPE:-tgz}
|
10
desktop/wmwebcam/wmwebcam.info
Normal file
10
desktop/wmwebcam/wmwebcam.info
Normal file
|
@ -0,0 +1,10 @@
|
|||
PRGNAM="wmwebcam"
|
||||
VERSION="0.3.5"
|
||||
HOMEPAGE="http://bloodbathsoftworks.com/eukara/files/index.php?dir=UNIX%2Fapplications%2F"
|
||||
DOWNLOAD="http://bloodbathsoftworks.com/eukara/files/UNIX/applications/wmwebcam-0.3.5-fixed.tar.gz"
|
||||
MD5SUM="e0a65c02d9743f38c8639d8035bb13b0"
|
||||
DOWNLOAD_x86_64=""
|
||||
MD5SUM_x86_64=""
|
||||
REQUIRES=""
|
||||
MAINTAINER="Gethyn ThomasQuail"
|
||||
EMAIL="gethyn@bloodbathsoftworks.com"
|
Loading…
Reference in a new issue