* Revise directory structure

* Update translation files and mmal

* Test for sys/videoio.h

* Revise sysconfdir specification

* Update defines to match configure

* v4l2 configure, translations

* Update travis

* Updated tests for travis

* Updated 16.04 and fewer checks

* Update travis for Mac

* Move CODE_STANDARD and delete test_builds.sh

* Update documentation
This commit is contained in:
Mr-DaveDev
2019-09-21 21:15:08 -06:00
committed by Mr-Dave
parent be0838067d
commit 0dc2ae9372
115 changed files with 16118 additions and 16239 deletions

77
.gitignore vendored
View File

@@ -1,25 +1,64 @@
Makefile
Makefile.in
ABOUT-NLS
compile
config.guess
config.h
motion
motion.init-Debian
motion.init-FreeBSD.sh
motion.service
motion.spec
motion-dist.conf
camera1-dist.conf
camera2-dist.conf
camera3-dist.conf
camera4-dist.conf
# automake
*.o
*.log
.depend
config.h.in
config.h.in~
config.log
config.rpath
config.status
config.sub
configure
autom4te.cache
aclocal.m4
config.status
configure
config.h.in
depcomp
install-sh
m4/
missing
stamp-h1
#data
data/motion.service
data/motion-dist.conf
data/camera1-dist.conf
data/camera2-dist.conf
data/camera3-dist.conf
data/camera4-dist.conf
#src
src/*.o
src/motion
src/Makefile
src/Makefile.in
src/.deps/
src/Makefile
src/Makefile.in
src/raspicam/*.o
src/raspicam/.dirstamp
src/raspicam/.deps/
*.log
.depend
#po
po/*.mo
.vscode/
po/*.gmo
po/Makefile
po/Makefile.in
po/Makefile.in.in
po/Makevars.template
po/POTFILES
po/Rules-quot
po/boldquot.sed
po/en@boldquot.header
po/en@quot.header
po/insert-header.sin
po/quot.sed
po/motion.pot
po/remove-potcdate.sed
po/remove-potcdate.sin
po/stamp-po
.vscode/

View File

@@ -56,6 +56,7 @@ before_script:
- if [ $TRAVIS_OS_NAME = osx ]; then
brew upgrade ffmpeg pkg-config jpeg libmicrohttpd;
brew install ffmpeg pkg-config libjpeg libmicrohttpd;
export PATH="/usr/local/opt/gettext/bin:/usr/local/bin:$PATH";
autoreconf -fiv;
elif [ "$BUILD_IMAGE" = "14.04" ]; then
autoreconf -fiv;
@@ -67,27 +68,33 @@ before_script:
docker exec $(docker ps -aq) /bin/sh -c 'autoreconf -fiv';
elif [ "$DOCKER_IMAGE" = "debian:buster" ]; then
docker exec $(docker ps -aq) /bin/bash -c 'apt-get -qq update';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg62-turbo-dev libzip-dev autoconf automake pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg62-turbo-dev libzip-dev autoconf automake autopoint pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libmariadbclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
elif [ "$DOCKER_IMAGE" = "debian:stretch" ]; then
docker exec $(docker ps -aq) /bin/bash -c 'apt-get -qq update';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg62-turbo-dev libzip-dev autoconf automake pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg62-turbo-dev libzip-dev autoconf automake autopoint pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev default-libmysqlclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libmariadbclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
elif [ "$DOCKER_IMAGE" = "debian:jessie" ]; then
docker exec $(docker ps -aq) /bin/bash -c 'apt-get -qq update';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg62-turbo-dev libzip-dev autoconf automake pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg62-turbo-dev libzip-dev autoconf automake autopoint pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libmysqlclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
elif [ "$DOCKER_IMAGE" = "ubuntu:16.04" ]; then
docker exec $(docker ps -aq) /bin/bash -c 'apt-get -qq update';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg8-dev libzip-dev autoconf automake autopoint pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libmysqlclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
elif [ "x$DOCKER_IMAGE" != "x" ]; then
docker exec $(docker ps -aq) /bin/bash -c 'apt-get -qq update';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg8-dev libzip-dev autoconf automake pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y build-essential libjpeg8-dev libzip-dev autoconf automake autopoint pkgconf libtool git';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libmysqlclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'apt-get install -y libsqlite3-dev libpq-dev libmariadbclient-dev libwebp-dev libmicrohttpd-dev gettext';
docker exec $(docker ps -aq) /bin/bash -c 'autoreconf -fiv';
fi;
@@ -95,9 +102,9 @@ script:
- if [ $TRAVIS_OS_NAME = osx ]; then
./configure --with-developer-flags && make;
elif [ "$BUILD_IMAGE" = "14.04" ]; then
./test_builds.sh;
./configure && make check;
elif [ "$DOCKER_IMAGE" = "alpine:latest" ]; then
docker exec $(docker ps -aq) /bin/sh -c './test_builds.sh';
docker exec $(docker ps -aq) /bin/sh -c './configure && make check';
elif [ "x$DOCKER_IMAGE" != "x" ]; then
docker exec $(docker ps -aq) /bin/bash -c './test_builds.sh';
docker exec $(docker ps -aq) /bin/bash -c './configure && make check';
fi;

2
FAQ
View File

@@ -1,2 +0,0 @@
This FAQ is no longer kept up to date
Look at the guide in /usr/share/doc/motion/motion_guide.html

86
Makefile.am Normal file
View File

@@ -0,0 +1,86 @@
ACLOCAL_AMFLAGS = -I m4
SUBDIRS = src po man
sysconfdir = @sysconfdir@/$(PACKAGE)
sysconf_DATA = \
data/motion-dist.conf \
data/camera1-dist.conf \
data/camera2-dist.conf \
data/camera3-dist.conf \
data/camera4-dist.conf
man_MANS = man/motion.1
docdir = $(datadir)/doc/@PACKAGE@
doc_DATA = \
doc/mask1.png \
doc/normal.jpg \
doc/outputmotion1.jpg \
doc/outputnormal1.jpg \
doc/motion_guide.html \
doc/motion_stylesheet.css \
doc/COPYING \
doc/CREDITS \
doc/motion_build.html \
doc/motion_config.html
###################################################################
## Create pristine directories to match exactly distributed files
###################################################################
cleanall: distclean
@rm -rf autom4te.cache m4
@rm -f config.h.in config.h.in~ aclocal.m4 config.sub ABOUT-NLS missing
@rm -f compile config.guess config.rpath configure depcomp install-sh
@rm -f po/en@boldquot.header po/en@quot.header po/insert-header.sin
@rm -f po/Makevars.template po/quot.sed po/remove-potcdate.sin
@rm -f po/Rules-quot po/stamp-po po/*.gmo po/motion.pot po/boldquot.sed
@rm -f Makefile.in src/Makefile.in po/Makefile.in.in man/Makefile.in
@rm -f data/motion.service data/motion-dist.conf
@rm -f data/camera1-dist.conf data/camera2-dist.conf
@rm -f data/camera3-dist.conf data/camera4-dist.conf
###################################################################
## Clean out the tilde crumb files left by gettext autotool processing
###################################################################
all-local:
@rm -f po/*.po\~
###################################################################
## Update contents of sample files with the correct directory
###################################################################
install-data-local:
@sed -e 's|$${prefix}|$(prefix)|' ${sysconfdir}/motion-dist.conf > ${sysconfdir}/motion-dist.conf.tmp && mv -f ${sysconfdir}/motion-dist.conf.tmp ${sysconfdir}/motion-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' ${sysconfdir}/camera1-dist.conf > ${sysconfdir}/camera1-dist.conf.tmp && mv -f ${sysconfdir}/camera1-dist.conf.tmp ${sysconfdir}/camera1-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' ${sysconfdir}/camera2-dist.conf > ${sysconfdir}/camera2-dist.conf.tmp && mv -f ${sysconfdir}/camera2-dist.conf.tmp ${sysconfdir}/camera2-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' ${sysconfdir}/camera3-dist.conf > ${sysconfdir}/camera3-dist.conf.tmp && mv -f ${sysconfdir}/camera3-dist.conf.tmp ${sysconfdir}/camera3-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' ${sysconfdir}/camera4-dist.conf > ${sysconfdir}/camera4-dist.conf.tmp && mv -f ${sysconfdir}/camera4-dist.conf.tmp ${sysconfdir}/camera4-dist.conf
@sed -e 's|$${exec_prefix}|$(exec_prefix)|' data/motion.service > data/motion.service.tmp && mv -f data/motion.service.tmp data/motion.service
@sed -e 's|$${prefix}|$(prefix)|' data/motion-dist.conf > data/motion-dist.conf.tmp && mv -f data/motion-dist.conf.tmp data/motion-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' data/camera1-dist.conf > data/camera1-dist.conf.tmp && mv -f data/camera1-dist.conf.tmp data/camera1-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' data/camera2-dist.conf > data/camera2-dist.conf.tmp && mv -f data/camera2-dist.conf.tmp data/camera2-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' data/camera3-dist.conf > data/camera3-dist.conf.tmp && mv -f data/camera3-dist.conf.tmp data/camera3-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' data/camera4-dist.conf > data/camera4-dist.conf.tmp && mv -f data/camera4-dist.conf.tmp data/camera4-dist.conf
check:
./configure --with-prototype-flags && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-mariadb && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-ffmpeg && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-mysql && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-mariadb && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-sqlite3 && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-pgsql && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-v4l2 && $(MAKE) clean && $(MAKE)
./configure --with-prototype-flags --without-webp && $(MAKE) clean && $(MAKE)
./configure --with-developer-flags \
--without-mysql \
--without-mariadb \
&& $(MAKE) clean && $(MAKE)
./configure --with-developer-flags \
--without-mysql \
--without-mariadb \
--without-sqlite3 \
--without-pgsql \
&& $(MAKE) clean && $(MAKE)

View File

@@ -1,294 +0,0 @@
################################################################################
# Makefile for Motion #
################################################################################
# Copyright 2000 by Jeroen Vreeken #
# #
# This program is published under the GNU public license version 2.0 or later. #
# Please read the file COPYING for more info. #
################################################################################
# Please visit the Motion home page: #
# https://motion-project.github.io/ #
################################################################################
CC = @CC@
INSTALL = install
INSTALL_DATA = ${INSTALL} -m 644
################################################################################
# Install locations, controlled by setting configure flags. #
################################################################################
prefix = @prefix@
exec_prefix = @exec_prefix@
bindir = @bindir@
mandir = @mandir@
sysconfdir = @sysconfdir@
datadir = @datadir@
datarootdir = @datarootdir@
docdir = $(datadir)/doc/@PACKAGE_NAME@
examplesdir = $(datadir)/@PACKAGE_NAME@/examples
localedir = @localedir@
################################################################################
# These variables contain compiler flags, object files to build and files to #
# install. #
################################################################################
CFLAGS = @CFLAGS@ -Wall \
-DVERSION=\"@PACKAGE_VERSION@\" \
-Dsysconfdir=\"$(sysconfdir)\" \
-DLOCALEDIR=\"$(DESTDIR)$(localedir)\" \
-DMOTIONDOCDIR=\"$(DESTDIR)$(docdir)\" \
@FFMPEG_CFLAGS@ @MMAL_CFLAGS@
LDFLAGS = @LDFLAGS@
LIBS = @LIBS@ @MMAL_LIBS@ @FFMPEG_LIBS@
OBJ = motion.o logger.o conf.o draw.o jpegutils.o \
video_loopback.o video_v4l2.o video_common.o video_bktr.o \
netcam.o netcam_http.o netcam_ftp.o netcam_jpeg.o netcam_wget.o \
track.o alg.o event.o picture.o rotate.o translate.o \
webu.o webu_html.o webu_text.o webu_stream.o \
stream.o md5.o netcam_rtsp.o ffmpeg.o \
@MMAL_OBJ@ @SQLITE_OBJ@
SRC = $(foreach obj,$(OBJ:.o=.c),@top_srcdir@/$(obj))
DOC = CHANGELOG COPYING CREDITS README.md \
motion_guide.html motion_stylesheet.css \
motion_config.html motion_build.html \
mask1.png normal.jpg outputmotion1.jpg outputnormal1.jpg
DOC_FILES = $(foreach doc,$(DOC),@top_srcdir@/$(doc))
EXAMPLES = *.conf motion.service
EXAMPLES_BIN = motion.init-Debian motion.init-FreeBSD.sh
PROGS = motion
DEPEND_FILE = .depend
LANGCDS = @LANGCDS@
################################################################################
# ALL and PROGS build Motion and, possibly, Motion-control. #
################################################################################
all: progs
ifeq ("@DISTRO@","Linux")
@echo "Build complete, run \"make install\" to install Motion!"
else
@echo "Build complete, run \"gmake install\" to install Motion!"
endif
@echo
progs: pre-build-info $(PROGS) convert-po
################################################################################
# Convert the po translation files into mo files #
################################################################################
convert-po:
ifeq ("@INTL@","yes")
@echo Performing the conversion of .po to .mo files
@for lng in $(LANGCDS); \
do \
msgfmt @top_srcdir@/po/$$lng.po -o @top_srcdir@/po/$$lng.mo ; \
if [ $$? -ne 0 ]; then exit 1; fi; \
done
else
@echo Skipping translations
endif
@echo
################################################################################
# PRE-BUILD-INFO outputs some general info before the build process starts. #
################################################################################
pre-build-info:
@echo "Welcome to the setup procedure for Motion, the motion detection daemon! If you get"
@echo "error messages during this procedure, please report them to the mailing list. The"
@echo "Motion Guide contains all information you should need to get Motion up and running."
@echo
@echo "Version: @PACKAGE_VERSION@"
ifeq ("@DISTRO@","Linux")
@echo "Platform: Linux (if this is incorrect, please read README.FreeBSD)"
else
@echo "Platform: *BSD/Darwin"
endif
@echo
################################################################################
# MOTION builds motion. MOTION-OBJECTS and PRE-MOBJECT-INFO are helpers. #
################################################################################
motion: motion-objects
@echo "Linking Motion..."
@echo "--------------------------------------------------------------------------------"
$(CC) $(LDFLAGS) -o $@ $(OBJ) $(LIBS)
@echo "--------------------------------------------------------------------------------"
@echo "Motion has been linked."
@echo
motion-objects: dep pre-mobject-info $(OBJ)
@echo "--------------------------------------------------------------------------------"
@echo "Motion object files compiled."
@echo
pre-mobject-info:
@echo "Compiling Motion object files..."
@echo "--------------------------------------------------------------------------------"
################################################################################
# Define the compile command for C files. #
################################################################################
%.o: @top_srcdir@/%.c
@echo -e "\tCompiling $< into $@..."
@$(CC) -c $(CFLAGS) -I@top_builddir@ $< -o $@
################################################################################
# Include the dependency file if it exists. #
################################################################################
ifeq ($(DEPEND_FILE), $(wildcard $(DEPEND_FILE)))
ifeq (,$(findstring clean,$(MAKECMDGOALS)))
-include $(DEPEND_FILE)
endif
endif
################################################################################
# Make the dependency file depend on all header files and all relevant source #
# files. This forces the file to be re-generated if the source/header files #
# change. Note, however, that the existing version will be included before #
# re-generation. #
################################################################################
$(DEPEND_FILE): *.h $(SRC)
@echo "Generating dependencies, please wait..."
@$(CC) $(CFLAGS) -I@top_builddir@ -M $(SRC) > .tmp
@mv -f .tmp $(DEPEND_FILE)
@echo
################################################################################
# DEP, DEPEND and FASTDEP generate the dependency file. #
################################################################################
dep depend fastdep: $(DEPEND_FILE)
################################################################################
# DEV, BUILD with developer flags #
################################################################################
dev: distclean autotools all
autotools:
autoconf
./configure --with-developer-flags
set-version:
autoconf
./configure --with-developer-flags
help:
@echo "--------------------------------------------------------------------------------"
@echo "make Build motion from local copy in your computer"
@echo "make current Build last version of motion from svn"
@echo "make dev Build motion with dev flags"
@echo "make dev-git Build motion with dev flags for git"
@echo "make build-commit Build last version of motion and prepare to commit to svn"
@echo "make build-commit-git Build last version of motion and prepare to commit to git"
@echo "make clean Clean objects"
@echo "make distclean Clean everything"
@echo "make install Install binary , examples , docs and config files"
@echo "make uninstall Uninstall all installed files"
@echo "--------------------------------------------------------------------------------"
@echo
################################################################################
# INSTALL installs all relevant files. #
################################################################################
install:
@echo "Installing files..."
@echo "--------------------------------------------------------------------------------"
mkdir -p $(DESTDIR)$(bindir)
mkdir -p $(DESTDIR)$(mandir)/man1
mkdir -p $(DESTDIR)$(sysconfdir)/motion
mkdir -p $(DESTDIR)$(docdir)
mkdir -p $(DESTDIR)$(examplesdir)
@sed -e 's|$${prefix}|$(prefix)|' motion-dist.conf > motion-dist.conf.tmp && mv -f motion-dist.conf.tmp motion-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' camera1-dist.conf > camera1-dist.conf.tmp && mv -f camera1-dist.conf.tmp camera1-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' camera2-dist.conf > camera2-dist.conf.tmp && mv -f camera2-dist.conf.tmp camera2-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' camera3-dist.conf > camera3-dist.conf.tmp && mv -f camera3-dist.conf.tmp camera3-dist.conf
@sed -e 's|$${prefix}|$(prefix)|' camera4-dist.conf > camera4-dist.conf.tmp && mv -f camera4-dist.conf.tmp camera4-dist.conf
$(INSTALL_DATA) @top_srcdir@/motion.1 $(DESTDIR)$(mandir)/man1
$(INSTALL_DATA) $(DOC_FILES) $(DESTDIR)$(docdir)
$(INSTALL_DATA) $(EXAMPLES) $(DESTDIR)$(examplesdir)
$(INSTALL) $(EXAMPLES_BIN) $(DESTDIR)$(examplesdir)
$(INSTALL_DATA) motion-dist.conf $(DESTDIR)$(sysconfdir)/motion
$(INSTALL_DATA) camera1-dist.conf $(DESTDIR)$(sysconfdir)/motion
$(INSTALL_DATA) camera2-dist.conf $(DESTDIR)$(sysconfdir)/motion
$(INSTALL_DATA) camera3-dist.conf $(DESTDIR)$(sysconfdir)/motion
$(INSTALL_DATA) camera4-dist.conf $(DESTDIR)$(sysconfdir)/motion
@for prog in $(PROGS); \
do \
($(INSTALL) $$prog $(DESTDIR)$(bindir) ); \
done
ifeq ("@INTL@","yes")
@echo Installing translation files
@for lng in $(LANGCDS); \
do \
mkdir -p $(DESTDIR)$(localedir)/$$lng"/LC_MESSAGES/"; \
$(INSTALL_DATA) @top_srcdir@/po/$$lng.mo \
$(DESTDIR)$(localedir)/$$lng"/LC_MESSAGES/motion.mo" ; \
done
else
@echo Skipping translations
endif
@echo "--------------------------------------------------------------------------------"
@echo "Install complete! The default configuration file, motion-dist.conf, has been"
@echo "installed to $(sysconfdir)/motion. You need to rename/copy it to motion.conf"
@echo "for Motion to find it. More configuration examples as well as init scripts"
@echo "can be found in $(examplesdir)."
@echo
################################################################################
# UNINSTALL and REMOVE uninstall already installed files. #
################################################################################
uninstall remove: pre-build-info
@echo "Uninstalling files..."
@echo "--------------------------------------------------------------------------------"
for prog in $(PROGS); \
do \
($ rm -f $(bindir)/$$prog ); \
done
rm -f $(mandir)/man1/motion.1
rm -f $(sysconfdir)/motion/motion-dist.conf
rm -f $(sysconfdir)/motion/camera1-dist.conf
rm -f $(sysconfdir)/motion/camera2-dist.conf
rm -f $(sysconfdir)/motion/camera3-dist.conf
rm -f $(sysconfdir)/motion/camera4-dist.conf
rm -rf $(docdir)
rm -rf $(examplesdir)
ifeq ("@INTL@","yes")
@echo Removing translation files files
@for lng in $(LANGCDS); \
do \
rm -f $(DESTDIR)$(localedir)/$$lng"/LC_MESSAGES/motion.mo" ; \
done
endif
@echo "--------------------------------------------------------------------------------"
@echo "Uninstall complete!"
@echo
################################################################################
# CLEAN is basic cleaning; removes object files and executables, but does not #
# remove files generated from the configure step. #
################################################################################
clean: pre-build-info
@echo "Removing compiled files and binaries..."
@rm -f *~ *.o $(PROGS) combine $(DEPEND_FILE)
@rm -f ./po/*.mo
################################################################################
# DIST restores the directory to distribution state. #
################################################################################
dist: distclean
@chmod -R 644 *
@chmod 755 configure
@chmod 755 version.sh
################################################################################
# DISTCLEAN removes all files generated during the configure step in addition #
# to basic cleaning. #
################################################################################
distclean: clean
@echo "Removing files generated by configure..."
@rm -f config.status config.log config.cache Makefile motion.service motion.init-Debian motion.init-FreeBSD.sh
@rm -f camera1-dist.conf camera2-dist.conf camera3-dist.conf camera4-dist.conf motion-dist.conf motion-help.conf motion.spec
@rm -rf autom4te.cache config.h
@echo "You will need to re-run configure if you want to build Motion."
@echo
.PHONY: install

View File

File diff suppressed because it is too large Load Diff

View File

View File

View File

View File

View File

@@ -8,7 +8,7 @@ The packages and library names change frequently and vary across base operating
Adjust the following lines as required by the base operating system.
Install basic build packages:
sudo apt-get install autoconf automake pkgconf libtool libjpeg8-dev build-essential libzip-dev gettext libmicrohttpd-dev
sudo apt-get install autoconf automake autopoint pkgconf libtool libjpeg8-dev build-essential libzip-dev gettext libmicrohttpd-dev
Install FFMPEG packages
sudo apt-get install libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev

View File

View File

Before

Width:  |  Height:  |  Size: 854 B

After

Width:  |  Height:  |  Size: 854 B

View File

@@ -122,7 +122,8 @@
</ul>
<p></p>
Next, install the retrieved deb package. Below is a sample method to install that
uses the gdebi tool.
uses the gdebi tool. The author prefers this tool since it will automatically retrieve
any dependency packages and yet still can be run without graphical interface.
<p></p>
<ul>
<code><strong>sudo apt-get install gdebi-core</strong></code>
@@ -159,7 +160,7 @@
Once you have reviewed the script and determined that it is OK to run, close out of the editor and then
run the command <code>chmod +x ./builddeb.sh</code> to make the script executable.
<p></p>
Run the script <code>./builddeb.sh myname, myemail, master, n, any</code>
Run the script <code>./builddeb.sh myname myemail master n any</code>
<p></p>
The script will validate the dependencies and report any additional dependencies which must be installed or if
all the dependencies are installed, it will create a deb package. Note that this may take a bit of time on
@@ -180,7 +181,7 @@
<p></p>
Debian / Ubuntu / Raspbian Packages
<ul>
<code><strong>sudo apt-get install autoconf automake build-essential pkgconf libtool libzip-dev
<code><strong>sudo apt-get install autoconf automake autopoint build-essential pkgconf libtool libzip-dev
libjpeg-dev git libavformat-dev libavcodec-dev libavutil-dev libswscale-dev libavdevice-dev
libwebp-dev gettext libmicrohttpd-dev</strong></code>
<p></p>
@@ -195,7 +196,7 @@
</ul>
FreeBSD
<ul>
<code><strong>sudo pkg install autoconf pkgconf automake gmake git ffmpeg gettext libmicrohttpd </strong></code>
<code><strong>sudo pkg install autoconf pkgconf automake autopoint gmake git ffmpeg gettext libmicrohttpd </strong></code>
<p></p>
<code><strong>cd ~</strong></code>
<br /><code><strong>git clone https://github.com/Motion-Project/motion.git</strong></code>
@@ -208,7 +209,9 @@
</ul>
Mac OS X
<ul>
<code><strong>brew install ffmpeg pkg-config libjpeg automake postgresql gettext libmicrohttpd</strong></code>
<code><strong>brew install ffmpeg pkg-config libjpeg libmicrohttpd</strong></code>
<p></p>
<code><strong>export PATH="/usr/local/opt/gettext/bin:/usr/local/bin:$PATH"</strong></code>
<p></p>
<code><strong>cd ~</strong></code>
<br /><code><strong>git clone https://github.com/Motion-Project/motion.git</strong></code>
@@ -249,8 +252,8 @@
<li>Required</li>
<ul>
<p></p>
<code><strong>sudo apt-get install autoconf automake build-essential pkgconf libtool git libzip-dev
libjpeg-dev gettext libmicrohttpd-dev</strong></code>
<code><strong>sudo apt-get install autoconf automake autopoint build-essential pkgconf
libtool git libzip-dev libjpeg62-turbo-dev gettext libmicrohttpd-dev</strong></code>
<p></p>
</ul>
<p></p>
@@ -265,13 +268,19 @@
<li>MySQL database functionality</li>
<ul>
<p></p>
<code><strong>sudo apt-get install mysql-server libmysqlclient-dev</strong></code>
<code><strong>sudo apt-get install libmysqlclient-dev</strong></code>
<p></p>
or (depends upon your distribution and version)
<p></p>
<code><strong>sudo apt-get install default-libmysqlclient-dev</strong></code>
<p></p>
</ul>
<li>MariaDB database functionality</li>
<ul>
<p></p>
<code><strong>sudo apt-get install libmariadbclient-dev</strong></code>
<p></p>
</ul>
<li>PostgreSQL database functionality</li>
<ul>
<p></p>
@@ -307,7 +316,7 @@
<li>Required</li>
<ul>
<p></p>
<code><strong>sudo zypper install autoconf automake libtool git </strong></code>
<code><strong>sudo zypper install autoconf automake autopoint libtool git </strong></code>
<p></p>
<code><strong>sudo zypper install --type pattern devel_basis </strong></code>
<p></p>
@@ -335,6 +344,12 @@
<code><strong>Not known by author</strong></code>
<p></p>
</ul>
<li>MariaDB database functionality</li>
<ul>
<p></p>
<code><strong>Not known by author</strong></code>
<p></p>
</ul>
<li>PostgreSQL database functionality</li>
<ul>
<p></p>
@@ -367,7 +382,7 @@
<li>Required packages</li>
<ul>
<p></p>
<code><strong> sudo pkg install autoconf pkgconf automake gmake git gettext libmicrohttpd</strong></code>
<code><strong> sudo pkg install autoconf pkgconf automake autopoint gmake git gettext libmicrohttpd</strong></code>
<p></p>
</ul>
<li>Optional packages</li>
@@ -384,6 +399,12 @@
<code><strong>sudo pkg install mysql57-client openssl</strong></code>
<p></p>
</ul>
<li>MariaDB database functionality</li>
<ul>
<p></p>
<code><strong>Not known by author</strong></code>
<p></p>
</ul>
<li>PostgreSQL database functionality</li>
<ul>
<p></p>
@@ -464,6 +485,12 @@
<code><strong>Not known by author</strong></code>
<p></p>
</ul>
<li>MariaDB database functionality</li>
<ul>
<p></p>
<code><strong>Not known by author</strong></code>
<p></p>
</ul>
<li>PostgreSQL database functionality</li>
<ul>
<p></p>
@@ -498,23 +525,23 @@
<p></p>
<li>Install brew as described on https://brew.sh</li>
<p></p>
<code><strong>brew upgrade ffmpeg pkg-config jpeg automake gettext libmicrohttpd-dev</strong></code>
<code><strong>brew upgrade ffmpeg pkg-config jpeg libmicrohttpd-dev</strong></code>
<p></p>
<code><strong>brew install ffmpeg pkg-config libjpeg automake </strong></code>
<code><strong>brew install ffmpeg pkg-config libjpeg libmicrohttpd </strong></code>
<p></p>
<code><strong>export PATH="/usr/local/opt/gettext/bin:/usr/local/bin:$PATH"</strong></code>
<p></p>
</ul>
<p></p>
<li>Optional Packages</li>
<li>PostgreSQL database functionality</li>
<ul>
<li>PostgreSQL database functionality</li>
<ul>
<p></p>
<code><strong>brew upgrade postgresql</strong></code>
<code><strong>brew install postgresql</strong></code>
<p></p>
</ul>
<ul>
<li>None known by author</li>
</ul>
</ul>
<p></p>
@@ -529,13 +556,13 @@
have the autotools create a configure script. To do this open a terminal and change to the directory with
the source code and type
<p></p>
<code><strong>autoreconf </strong></code>
<code>autoreconf </code>
<p></p>
If the 'configure' file exists and contains a valid script, the tool will return immediately since no additional work
needs to be completed. If the script needs updating, then it will take a moment to return. Once it has been executed,
a file called 'configure' will exist in the directory. Note that if the command is run as
<p></p>
<code><strong>autoreconf -f</strong></code>
<code>autoreconf -f</code>
<p></p>
The -f parameter instructs it to force a new configure file to be created. This can be preferable in certain
situations so that the configure script gets updated with the correct version number.
@@ -775,6 +802,11 @@
<td bgcolor="#edf4f9" word-wrap:break-word > Do not compile with MySQL support </td>
<td bgcolor="#edf4f9" word-wrap:break-word > Use this if you do not want to include MySQL support in the package. <br /> This can also be useful if you get compilation errors related to MySQL and you actually do not need the feature anyway. </td>
</tr>
<tr>
<td bgcolor="#edf4f9" word-wrap:break-word > --without-mariadb </td>
<td bgcolor="#edf4f9" word-wrap:break-word > Do not compile with MariaDB support </td>
<td bgcolor="#edf4f9" word-wrap:break-word > Use this if you do not want to include MariaDB support in the package. <br /> This can also be useful if you get compilation errors related to MariaDB and you actually do not need the feature anyway. </td>
</tr>
<tr>
<td bgcolor="#edf4f9" word-wrap:break-word > --without-pgsql </td>
<td bgcolor="#edf4f9" word-wrap:break-word > Do not compile with PostgreSQL support </td>
@@ -782,7 +814,7 @@
</tr>
<tr>
<td bgcolor="#edf4f9" word-wrap:break-word > --without-sqlite3 </td>
<td bgcolor="#edf4f9" word-wrap:break-word > Disable sqlite3 support in motion. </td>
<td bgcolor="#edf4f9" word-wrap:break-word > Disable sqlite3 support in motion. </td>
<td bgcolor="#edf4f9" word-wrap:break-word > Use this if you do not want to include SQLite3 support in the package. <br /> This can also be useful if you get compilation errors related to SQLite3 and you actually do not need the feature anyway. </td>
</tr>
<tr>
@@ -793,8 +825,13 @@
<tr>
<td bgcolor="#edf4f9" word-wrap:break-word > --with-developer-flags </td>
<td bgcolor="#edf4f9" word-wrap:break-word > Add additional warning flags for the compiler. </td>
<td bgcolor="#edf4f9" word-wrap:break-word > This option is for developers only. It checks to ensure that the code is robust. </td>
<td bgcolor="#edf4f9" word-wrap:break-word > This option is for developers only. It applies many compiler flags and errors on all warnings.</td>
</tr>
<tr>
<td bgcolor="#edf4f9" word-wrap:break-word > --with-prototype-flags </td>
<td bgcolor="#edf4f9" word-wrap:break-word > Add additional warning flags for the compiler. </td>
<td bgcolor="#edf4f9" word-wrap:break-word > This option is similar to --with-developer-flags but does not include flags for prototypes. </td>
</tr>
</tbody>
</table>
</div>
@@ -846,20 +883,20 @@
These commands create the required directories and copy the files into the following locations. (default directories):
<ul>
<li>/usr/local/bin</li>
<li>usr/local/man/man1</li>
<li>/usr/local/etc/motion</li>
<li>/usr/local/share/man/man1</li>
<li>/usr/local/share/doc/motion</li>
<li>/usr/local/share/motion/examples</li>
<li>/usr/local/share/locale</li>
</ul>
<p></p>
The contents of what gets copied into each directory is as follows:
(assuming the default PREFIX /usr/local was used when running configure. Otherwise adjust to the actual directory specified during the configure step.)
<ul>
<li> Executable binary "motion" to /usr/local/bin</li>
<li> Manual page "motion.1" to /usr/local/man/man1</li>
<li> Document files "CHANGELOG, COPYING, CREDITS, motion_guide.html, and README.md to /usr/local/share/doc/motion</li>
<li> Example configuration files "*.conf" to /usr/local/share/motion/examples</li>
<li> Configuration file "motion-dist.conf" to /usr/local/etc/motion</li>
<li> Manual page "motion.1" to /usr/local/share/man/man1</li>
<li> Document files to /usr/local/share/doc/motion</li>
<li> Example configuration files "*.conf" to /usr/local/etc/motion</li>
<li> Translation files to /usr/local/share/locale/*/LC_MESSAGES</li>
</ul>
Note that any existing files are overwritten. The default configuration file motion-dist.conf is named like
@@ -895,6 +932,16 @@
<dt> <strong>make distclean</strong> </dt>
<dd> deletes the files: config.status, config.log, config.cache, Makefile, and motion.spec.</dd>
</dl>
<p></p>
<dl>
<dt> <strong>make cleanall</strong> </dt>
<dd> Removes files created by autoreconf and runs a make clean. Resets to only files provided from source</dd>
</dl>
<p></p>
<dl>
<dt> <strong>make check</strong> </dt>
<dd> Executes multiple configure and make using the developer flags for various combinations of the configure flags</dd>
</dl>
<p></p>
<p></p>
</ul>
@@ -918,44 +965,7 @@
<code>locale</code>. If the log and web control still display in English, then this means
that translations have not been completed for that language. The Motion developers rely on
the community to provide these translations to the project. Even those that do not how to
program can assist in this process. The following is an abbreviated description of the
processes to update translations:
<p></p>
A .pot file is the base set of phrases and words to translate. To create a .pot file for Motion,
first clone the Motion git to a local directory and in a terminal window type
<code>xgettext --keyword=_ -o po/motion.pot *.c</code>
This program scans all the files which end in <code>.c</code> looking for the keyword
<code>_</code>(an underscore) which is the macro in the code to identify a item to
translate. The application then outputs a file into the po directory called
motion.pot. The motion.pot file is a text file which is a template of all
the phrases that can be translated. Translators can add translations to that file and
then save it with the particular language code and po extension. e.g. es.po for Spanish
<p></p>
A alternative is to use a common gui translation tool called poedit that is available
on most distributions. This is a program that is designed to work with pot / po files. It allows
users to open po and pot files and create/edit/merge translations.
<p></p>
It has been observed that it may be easiest to create the motion.pot file (as described above) and then
use that file in the poedit application.
<p></p>
Note that in order to simply revise an existing translation, users can edit the po file directly without
creating a motion.pot file.
<p></p>
<p></p>
<p></p>
The above process describes the items that have already been tagged within the code for
translation. If a particular phrase is reported in the log in English and that phrase is not
listed in the motion.pot file, then this means that the phrase needs to be tagged in the code. The
process to get the phrase tagging:
<p></p>
1. Find the module in the source code that is printing the message.
<p></p>
2. Validate that the header file "translate.h" is included at the top of the module.
<p></p>
3. Find the particular phrase and surround it with a <code>_()</code>
<p></p>
Save the file and then re-create the motion.pot file.
<p></p>
program can assist in this process by editing the files in the po directory.
<p></p>
<p></p>
</ul>

View File

@@ -3761,8 +3761,8 @@
<li> Default: 0 (disabled)</li>
</ul>
<p></p>
Ignore sudden massive light intensity changes given as a percentage of the picture area that changed intensity.
The value defines the picture areas in percent that will trigger the lightswitch condition. When lightswitch is
Ignore sudden massive light intensity changes when the percentage of the picture area that changed intensity is greater than this value.
The value defines the picture area in percent above which the lightswitch condition will trigger. When lightswitch is
detected motion detection is disabled for a configured number of frames. This is to avoid false detection when
light conditions change and when a camera changes sensitivity at low light.
<p></p>

84
doc/motion_guide.html Normal file
View File

@@ -0,0 +1,84 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<link href="motion.png" rel="icon" type="image/png">
<title>Motion</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="motion_stylesheet.css" media="screen">
<script>
function fnc_topnav() {
var x = document.getElementById("id_topnav");
if (x.className === "topnav") {
x.className += " responsive";
} else {
x.className = "topnav";
}
}
</script>
</head>
<body>
<div class="topnav" id="id_topnav">
<img class="logoimg" src="motion.gif">
<a class="topnav-d" href="https://motion-project.github.io/motion_support.html">Support</a>
<a class="topnav-d" href="https://motion-project.github.io/motion_news.html" >News</a>
<a class="topnav-d" href="https://motion-project.github.io/motion_guide.html" >Documentation</a>
<a class="topnav-d" href="https://motion-project.github.io/motion_download.html">Download</a>
<a class="topnav-d" href="https://motion-project.github.io/index.html">Home</a>
<a class="topnav-m" href="https://motion-project.github.io/index.html">Home</a>
<a class="topnav-m" href="https://motion-project.github.io/motion_download.html">Download</a>
<a class="topnav-m" href="https://motion-project.github.io/motion_guide.html" >Documentation</a>
<a class="topnav-m" href="https://motion-project.github.io/motion_news.html" >News</a>
<a class="topnav-m" href="https://motion-project.github.io/motion_support.html">Support</a>
<a href="javascript:void(0);" class="icon" onclick="fnc_topnav()">&#9776;</a>
</div>
<section class="page-header">
<h1>
Documentation
</h1>
</section>
<section class="main-content">
<h3><a name="Current_Release"></a> Latest Stable Release</h3>
<ul>
<li> <a href="motion_build.html"> Installing with apt/debs and building from source </a></li>
<li> <a href="motion_config.html"> Configuration </a></li>
<li> <a href="motion_config.html#commandlineoptions"> Command Line Options </a></li>
<li> <a href="motion_config.html#configfiles">Configuration Files</a></li>
<li> <a href="motion_config.html#Signals_Sent"> Signals (sent with e.g. kill command) </a></li>
<li> Configuration Options</li>
<ul>
<li> <a href="motion_config.html#Configuration_OptionsAlpha"> Listed alphabetically with mapping of old option names to current names </a></li>
<li> <a href="motion_config.html#Configuration_OptionsTopic"> Listed by topic </a></li>
<li> <a href="motion_config.html#Configuration_OptionsDetail"> Detail descriptions of each option</a></li>
</ul>
<p></p>
<p></p>
</ul>
<p></p>
Short videos demonstrating the Motion software can also be viewed
<a href="https://www.youtube.com/channel/UCZpOjUMnc-uO3qIyZAD_4lg/videos"> here</a>.
<p></p>
<p></p>
<p></p>
<h3><a name="Prior"></a> Prior Release Versions</h3>
<ul>
<li> <a href="4.2.2/motion_config.html"> Version 4.2.2</a></li>
<li> <a href="4.2.1/motion_config.html"> Version 4.2.1</a></li>
<li> <a href="4.2/motion_config.html"> Version 4.2</a></li>
<li> <a href="4.1.1/motion_guide.html"> Version 4.1.1</a></li>
<li> <a href="4.1/motion_guide.html"> Version 4.1</a></li>
<li> <a href="4.0.1/motion_guide.html"> Version 4.0.1</a></li>
<li> <a href="4.0/motion_guide.html"> Version 4.0</a></li>
<li> <a href="3.4.1/motion_guide.html"> Version 3.4.1</a></li>
<p></p>
<p></p>
</ul>
</section>
</body>
</html>

View File

Before

Width:  |  Height:  |  Size: 14 KiB

After

Width:  |  Height:  |  Size: 14 KiB

View File

Before

Width:  |  Height:  |  Size: 5.9 KiB

After

Width:  |  Height:  |  Size: 5.9 KiB

View File

Before

Width:  |  Height:  |  Size: 15 KiB

After

Width:  |  Height:  |  Size: 15 KiB

1
man/Makefile.am Normal file
View File

@@ -0,0 +1 @@
man_MANS = motion.1

View File

View File

@@ -1,69 +0,0 @@
#! /bin/bash
#
# @PACKAGE_NAME@ @PACKAGE_VERSION@
# Start the motion detection .
#
NAME=@PACKAGE_NAME@
PATH=/bin:/usr/bin:/sbin:/usr/sbin
DAEMON=@BIN_PATH@/@PACKAGE_NAME@
PIDFILE=/var/run/@PACKAGE_NAME@/$NAME.pid
trap "" 1
export LANG=C
export PATH
test -f $DAEMON || exit 0
case "$1" in
start)
echo "Starting @PACKAGE_NAME@ detection : $NAME"
start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON --chuid motion
;;
stop)
echo "Stopping @PACKAGE_NAME@ detection : $NAME"
start-stop-daemon --stop --pidfile $PIDFILE --oknodo --exec $DAEMON --retry 30
;;
status)
echo "Status @PACKAGE_NAME@ detection : $NAME"
if (test -f $PIDFILE); then
echo -n "Running process for $NAME : "
pidof $NAME
else
echo "Stopped"
fi
;;
reload-config)
echo "Reloading $NAME configuration"
start-stop-daemon --stop --pidfile $PIDFILE --signal HUP --exec $DAEMON
;;
restart-motion)
echo "Restarting $NAME"
start-stop-daemon --stop --pidfile $PIDFILE --oknodo --exec $DAEMON --retry 30
start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON --chuid motion
;;
restart)
$0 restart-motion
exit $?
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|status|reload-config|restart}"
exit 1
;;
esac
if [ $? == 0 ]; then
echo .
exit 0
else
echo failed
exit 1
fi

View File

@@ -1,26 +0,0 @@
#!/bin/sh
#
# motion.sh for rc.d usage 2006 Angel Carpintero
#
# Add the following line in /etc/rc.conf to enable @PACKAGE_NAME@ at startup
#
# motion_enable="YES"
#
# PROVIDE: @PACKAGE_NAME@
# REQUIRE: DAEMON
# KEYWORD: shutdown
. /etc/rc.subr
motion_enable="${motion_enable-NO}"
name="@PACKAGE_NAME@"
rcvar=`set_rcvar`
command="@BIN_PATH@/${name}"
pidfile="/var/run/${name}.pid"
required_files="/usr/local/etc/motion/${name}.conf"
load_rc_config $name
run_rc_command "$1"

View File

@@ -1,134 +0,0 @@
Name: @PACKAGE_NAME@
Version: @PACKAGE_VERSION@
Release: 1%{?dist}
Summary: A motion detection system
Group: Applications/Multimedia
License: GPLv2+
URL: https://motion-project.github.io/
Source0: https://github.com/Motion-Project/motion
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: libjpeg-devel ffmpeg-devel zlib-devel libwebp-devel
#This requires comes from the startup script, it will be there until motion supports libv4l calls in the code
Requires: libv4l
Requires(post): chkconfig
Requires(preun): chkconfig initscripts
Requires(postun): initscripts
%description
Motion is a software motion detector. It grabs images from video4linux devices
and/or from webcams (such as the axis network cameras). Motion is the perfect
tool for keeping an eye on your property keeping only those images that are
interesting. Motion is strictly command line driven and can run as a daemon
with a rather small footprint. This version is built with ffmpeg support but
without MySQL and PostgreSQL support.
%prep
%setup -q
%build
%configure --sysconfdir=%{_sysconfdir}/%{name} --without-optimizecpu --with-ffmpeg --without-mysql --without-pgsql
make %{?_smp_mflags}
%install
rm -rf %{buildroot}
make install DESTDIR=%{buildroot}
#We rename the configuration file
mv %{buildroot}%{_sysconfdir}/%{name}/motion-dist.conf %{buildroot}%{_sysconfdir}/%{name}/motion.conf
#We change the PID file path to match the one in the startup script
sed -i 's|/var/run/motion/motion.pid|/var/run/motion.pid|g' %{buildroot}%{_sysconfdir}/%{name}/motion.conf
#We remove SQL directives in the configuration file, as we don't use them
sed -i 's|sql_log_image|; sql_log_image|g' %{buildroot}%{_sysconfdir}/%{name}/motion.conf
sed -i 's|sql_log_snapshot|; sql_log_snapshot|g' %{buildroot}%{_sysconfdir}/%{name}/motion.conf
sed -i 's|sql_log_mpeg|; sql_log_mpeg|g' %{buildroot}%{_sysconfdir}/%{name}/motion.conf
sed -i 's|sql_log_timelapse|; sql_log_timelapse|g' %{buildroot}%{_sysconfdir}/%{name}/motion.conf
sed -i 's|sql_query|; sql_query|g' %{buildroot}%{_sysconfdir}/%{name}/motion.conf
#We set the log file and target directory - logging is for 3.3 branch
sed -i 's|;logfile|logfile /var/log/motion.log|g' %{buildroot}%{_sysconfdir}/%{name}/motion.conf
sed -i 's|target_dir /usr/local/apache2/htdocs/cam1|target_dir /var/motion|g' %{buildroot}%{_sysconfdir}/%{name}/motion.conf
#We install our startup script
install -D -m 0755 motion.init-Fedora %{buildroot}%{_initrddir}/%{name}
%post
#We add the motion init script to the services when installing
/sbin/chkconfig --add %{name}
%preun
#We stop the service and remove it from init scripts when erasing
if [ $1 = 0 ] ; then
/sbin/service %{name} stop >/dev/null 2>&1
/sbin/chkconfig --del %{name}
fi
%postun
#We restart the service during an upgrade
if [ "$1" -ge "1" ] ; then
/sbin/service %{name} condrestart >/dev/null 2>&1
fi
%clean
rm -rf %{buildroot}
%files
#Permissions are bogus upstream, we need to be sure to set them here
%defattr (-,root,root,-)
%dir %{_sysconfdir}/%{name}
%dir %{_datadir}/%{name}-%{version}
%dir %{_datadir}/%{name}-%{version}/examples
%doc CHANGELOG COPYING CREDITS INSTALL README motion_guide.html
%attr(0644,root,root) %{_datadir}/%{name}-%{version}/examples/motion-dist.conf
%attr(0755,root,root) %{_datadir}/%{name}-%{version}/examples/motion.init-Debian
%attr(0755,root,root) %{_datadir}/%{name}-%{version}/examples/motion.init-FreeBSD.sh
%attr(0755,root,root) %{_datadir}/%{name}-%{version}/examples/motion.init-Fedora
%attr(0644,root,root) %{_datadir}/%{name}-%{version}/examples/thread1.conf
%attr(0644,root,root) %{_datadir}/%{name}-%{version}/examples/thread2.conf
%attr(0644,root,root) %{_datadir}/%{name}-%{version}/examples/thread3.conf
%attr(0644,root,root) %{_datadir}/%{name}-%{version}/examples/thread4.conf
%attr(0644,root,root) %config(noreplace) %{_sysconfdir}/%{name}/motion.conf
%attr(0755,root,root) %{_bindir}/motion
%attr(0644,root,root) %{_mandir}/man1/motion.1*
%attr(0755,root,root) %{_initrddir}/%{name}
%changelog
* Thu Mar 06 2010 Steven Moix <steven.moix@axianet.ch> - 3.2.12-1
- New upstream release, important bugfixes only
* Wed Oct 21 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 3.2.11.1-3
- rebuild for new ffmpeg
* Tue Aug 11 2009 Steven Moix <steven.moix@axianet.ch> - 3.2.11.1-1
- Drop patch for ffmpeg 0.5 compatibility
- Drop ffmpeg detection patch
- Moved default output directory to /var/motion
- New startup script with added v4l2convert to support more cameras - https://bugzilla.rpmfusion.org/show_bug.cgi?id=681
- Fix Segfault on reload or quit for vloopback (maybe other v4l1 devices too)
- Fix fd leaks in external pipe
- Avoid possible stack smashing in v4l_open_vidpipe()
- Fix segfault for new libjpeg v7
* Mon Jul 06 2009 Steven Moix <steven.moix@axianet.ch> - 3.3.0-1
- SPEC Preparation for the 3.3 branch
* Sun Jun 05 2009 Steven Moix <steven.moix@axianet.ch> - 3.2.11-5
- Patch and rebuild for ffmpeg 0.5
* Sun Mar 29 2009 Thorsten Leemhuis <fedora [AT] leemhuis [DOT] info> - 3.2.11-4
- rebuild for new F11 features
* Wed Mar 18 2009 Steven Moix <steven.moix@axianet.ch> - 3.2.11-3
- Even more corrected init script thanks to Stewart Adam
* Sun Mar 15 2009 Steven Moix <steven.moix@axianet.ch> - 3.2.11-2
- Removed the ffmpeg requires
- Corrected the spec file
- New init script with a corrected start() function and LSB header support
* Tue Mar 03 2009 Steven Moix <steven.moix@axianet.ch> - 3.2.11-1
- Updated to Fedora 10 standard
* Sun Sep 18 2005 Kenneth Lavrsen <kenneth@lavrsen.dk> - 3.2.4-1
- Generic version of livna spec file replacing the old less optimal specfile.
* Thu Sep 15 2005 Dams <anvil[AT]livna.org> - 3.2.3-0.lvn.1
- Initial released based upon upstream spec file

View File

@@ -1,65 +0,0 @@
<!DOCTYPE html>
<html lang="en-us">
<head>
<meta charset="UTF-8">
<link href="motion.png" rel="icon" type="image/png">
<title>Motion</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" href="motion_stylesheet.css" media="screen">
</head>
<body>
<ul class="nav-button">
<li class="nav-button"><a href="https://motion-project.github.io/motion_support.html">Support</a></li>
<li class="nav-button"><a href="https://motion-project.github.io/motion_news.html">News</a></li>
<li class="nav-button"><a href="https://motion-project.github.io/motion_guide.html">Documentation</a></li>
<li class="nav-button"><a href="https://motion-project.github.io/motion_download.html">Download</a></li>
<li class="nav-button"><a href="https://motion-project.github.io/index.html">Home</a></li>
<li class="nav-button" style="float: left;"> <img src="motion.gif" width="125" height="50"> </li>
</ul>
<section class="page-header">
<h1>
Documentation
</h1>
</section>
<section class="main-content">
<h3><a name="Current_Release"></a> Latest Stable Release</h3>
<ul>
<li> <a href="motion_build.html"> Installing with apt/debs and building from source </a></li>
<li> <a href="motion_config.html"> Configuration </a></li>
<li> <a href="motion_config.html#Command_Line_Options"> Command Line Options </a></li>
<li> <a href="motion_config.html#The_Config_Files">Configuration Files</a></li>
<li> <a href="motion_config.html#Signals_Sent"> Signals (sent with e.g. kill command) </a></li>
<li> Configuration Options</li>
<ul>
<li> <a href="motion_config.html#Configuration_OptionsAlpha"> Listed alphabetically with mapping of old option names to current names </a></li>
<li> <a href="motion_config.html#Configuration_OptionsTopic"> Listed by topic </a></li>
<li> <a href="motion_config.html#Configuration_OptionsDetail"> Detail descriptions of each option</a></li>
</ul>
<p></p>
<p></p>
</ul>
<p></p>
<p></p>
<h3><a name="Git_Master_Guides"></a> Current Git Master</h3>
<ul>
<li> <a href="https://rawgit.com/Motion-Project/motion/master/motion_build.html"> Installing with apt/debs and building from source </a></li>
<li> <a href="https://rawgit.com/Motion-Project/motion/master/motion_config.html"> Configuration </a></li>
<li> <a href="https://rawgit.com/Motion-Project/motion/master/motion_config.html#Command_Line_Options"> Command Line Options </a></li>
<li> <a href="https://rawgit.com/Motion-Project/motion/master/motion_config.html#The_Config_Files">Configuration Files</a></li>
<li> <a href="https://rawgit.com/Motion-Project/motion/master/motion_config.html#Signals_Sent"> Signals (sent with e.g. kill command) </a></li>
<li> Configuration Options</li>
<ul>
<li> <a href="https://rawgit.com/Motion-Project/motion/master/motion_config.html#Configuration_OptionsAlpha"> Listed alphabetically with mapping of old option names to current names </a></li>
<li> <a href="https://rawgit.com/Motion-Project/motion/master/motion_config.html#Configuration_OptionsTopic"> Listed by topic </a></li>
<li> <a href="https://rawgit.com/Motion-Project/motion/master/motion_config.html#Configuration_OptionsDetail"> Detail descriptions of each option</a></li>
</ul>
<p></p>
<p></p>
</ul>
</section>
</body>
</html>

14
po/LINGUAS Normal file
View File

@@ -0,0 +1,14 @@
da
de
es
fi
fr
it
ja
ko
li
nl
no
pt
sv
zh

79
po/Makevars Normal file
View File

@@ -0,0 +1,79 @@
# Makefile variables for PO directory in any package using GNU gettext.
# Usually the message domain is the same as the package name.
DOMAIN = $(PACKAGE)
# These two variables depend on the location of this directory.
subdir = po
top_builddir = ..
# These options get passed to xgettext.
XGETTEXT_OPTIONS = --keyword=_ --keyword=N_ --add-location=file
# This is the copyright holder that gets inserted into the header of the
# $(DOMAIN).pot file. Set this to the copyright holder of the surrounding
# package. (Note that the msgstr strings, extracted from the package's
# sources, belong to the copyright holder of the package.) Translators are
# expected to transfer the copyright for their translations to this person
# or entity, or to disclaim their copyright. The empty string stands for
# the public domain; in this case the translators are expected to disclaim
# their copyright.
COPYRIGHT_HOLDER = Free Software Foundation, Inc.
# This tells whether or not to prepend "GNU " prefix to the package
# name that gets inserted into the header of the $(DOMAIN).pot file.
# Possible values are "yes", "no", or empty. If it is empty, try to
# detect it automatically by scanning the files in $(top_srcdir) for
# "GNU packagename" string.
PACKAGE_GNU =
# This is the email address or URL to which the translators shall report
# bugs in the untranslated strings:
# - Strings which are not entire sentences, see the maintainer guidelines
# in the GNU gettext documentation, section 'Preparing Strings'.
# - Strings which use unclear terms or require additional context to be
# understood.
# - Strings which make invalid assumptions about notation of date, time or
# money.
# - Pluralisation problems.
# - Incorrect English spelling.
# - Incorrect formatting.
# It can be your email address, or a mailing list address where translators
# can write to without being subscribed, or the URL of a web page through
# which the translators can contact you.
MSGID_BUGS_ADDRESS = https://motion-project.github.io
# This is the list of locale categories, beyond LC_MESSAGES, for which the
# message catalogs shall be used. It is usually empty.
EXTRA_LOCALE_CATEGORIES =
# This tells whether the $(DOMAIN).pot file contains messages with an 'msgctxt'
# context. Possible values are "yes" and "no". Set this to yes if the
# package uses functions taking also a message context, like pgettext(), or
# if in $(XGETTEXT_OPTIONS) you define keywords with a context argument.
USE_MSGCTXT = no
# These options get passed to msgmerge.
# Useful options are in particular:
# --previous to keep previous msgids of translated messages,
# --quiet to reduce the verbosity.
MSGMERGE_OPTIONS = --quiet
# These options get passed to msginit.
# If you want to disable line wrapping when writing PO files, add
# --no-wrap to MSGMERGE_OPTIONS, XGETTEXT_OPTIONS, and
# MSGINIT_OPTIONS.
MSGINIT_OPTIONS =
# This tells whether or not to regenerate a PO file when $(DOMAIN).pot
# has changed. Possible values are "yes" and "no". Set this to no if
# the POT file is checked in the repository and the version control
# program ignores timestamps.
PO_DEPENDS_ON_POT = no
# This tells whether or not to forcibly update $(DOMAIN).pot and
# regenerate PO files on "make dist". Possible values are "yes" and
# "no". Set this to no if the POT file and PO files are maintained
# externally.
DIST_DEPENDS_ON_UPDATE_PO = yes

29
po/POTFILES.in Normal file
View File

@@ -0,0 +1,29 @@
# main sources
src/alg.c
src/conf.c
src/draw.c
src/event.c
src/ffmpeg.c
src/jpegutils.c
src/logger.c
src/md5.c
src/mmalcam.c
src/motion.c
src/netcam.c
src/netcam_ftp.c
src/netcam_http.c
src/netcam_jpeg.c
src/netcam_rtsp.c
src/netcam_wget.c
src/picture.c
src/rotate.c
src/track.c
src/translate.c
src/video_bktr.c
src/video_common.c
src/video_loopback.c
src/video_v4l2.c
src/webu.c
src/webu_html.c
src/webu_stream.c
src/webu_text.c

2130
po/da.po
View File

File diff suppressed because it is too large Load Diff

2130
po/de.po
View File

File diff suppressed because it is too large Load Diff

2130
po/es.po
View File

File diff suppressed because it is too large Load Diff

2130
po/fi.po
View File

File diff suppressed because it is too large Load Diff

2136
po/fr.po
View File

File diff suppressed because it is too large Load Diff

2130
po/it.po
View File

File diff suppressed because it is too large Load Diff

2130
po/ja.po
View File

File diff suppressed because it is too large Load Diff

2130
po/ko.po
View File

File diff suppressed because it is too large Load Diff

2130
po/li.po
View File

File diff suppressed because it is too large Load Diff

2130
po/nl.po
View File

File diff suppressed because it is too large Load Diff

2130
po/no.po
View File

File diff suppressed because it is too large Load Diff

2130
po/pt.po
View File

File diff suppressed because it is too large Load Diff

2130
po/sv.po
View File

File diff suppressed because it is too large Load Diff

2130
po/zh.po
View File

File diff suppressed because it is too large Load Diff

View File

16
src/Makefile.am Normal file
View File

@@ -0,0 +1,16 @@
AM_CFLAGS= -Dsysconfdir=\"$(sysconfdir)/motion\" -DLOCALEDIR=\"$(DESTDIR)$(localedir)\"
if INC_MMAL_SRC
MMAL_SRC=raspicam/RaspiCamControl.c raspicam/RaspiCLI.c
endif
LIBS = @LIBINTL@ @LIBS@
bin_PROGRAMS = motion
motion_SOURCES = motion.c logger.c conf.c draw.c jpegutils.c video_loopback.c \
video_v4l2.c video_common.c video_bktr.c netcam.c netcam_http.c netcam_ftp.c \
netcam_jpeg.c netcam_wget.c netcam_rtsp.c track.c alg.c event.c picture.c \
rotate.c translate.c md5.c stream.c ffmpeg.c \
webu.c webu_html.c webu_stream.c webu_text.c mmalcam.c $(MMAL_SRC)

View File

View File

View File

@@ -2250,14 +2250,14 @@ void conf_print(struct context **cnt)
if (strlen(val) > 0)
fprintf(conffile, "%s\n", val);
else
fprintf(conffile, "; camera %s/motion/camera1.conf\n", sysconfdir);
fprintf(conffile, "; camera %s/camera1.conf\n", sysconfdir);
free(val);
} else if (thread == 0) {
char value[PATH_MAX];
/* The 'camera_dir' option should keep the installed default value */
if (!strncmp(config_params[i].param_name, "camera_dir", 10))
sprintf(value, "%s", sysconfdir"/motion/conf.d");
sprintf(value, "%s", sysconfdir"/conf.d");
else
sprintf(value, "%s", "value");
@@ -2370,7 +2370,7 @@ struct context **conf_load(struct context **cnt)
fp = fopen(filename, "r");
if (!fp) {
snprintf(filename, PATH_MAX, "%s/motion/motion.conf", sysconfdir);
snprintf(filename, PATH_MAX, "%s/motion.conf", sysconfdir);
fp = fopen(filename, "r");
if (!fp) /* There is no config file.... use defaults. */
@@ -3145,7 +3145,7 @@ static void usage()
printf("-h\t\t\tShow this screen.\n");
printf("\n");
printf("Motion is configured using a config file only. If none is supplied,\n");
printf("it will read motion.conf from current directory, ~/.motion or %s/motion.\n", sysconfdir);
printf("it will read motion.conf from current directory, ~/.motion or %s.\n", sysconfdir);
printf("\n");
}

View File

View File

View File

@@ -162,7 +162,7 @@ static void on_motion_detected_command(struct context *cnt,
exec_command(cnt, cnt->conf.on_motion_detected, NULL, 0);
}
#if defined(HAVE_MYSQL) || defined(HAVE_PGSQL) || defined(HAVE_SQLITE3)
#if defined(HAVE_MYSQL) || defined(HAVE_PGSQL) || defined(HAVE_SQLITE3) || defined(HAVE_MARIADB)
static void do_sql_query(char *sqlquery, struct context *cnt, int save_id)
{
@@ -173,7 +173,7 @@ static void do_sql_query(char *sqlquery, struct context *cnt, int save_id)
return;
}
#ifdef HAVE_MYSQL
#if defined(HAVE_MYSQL) || defined(HAVE_MARIADB)
if (!strcmp(cnt->conf.database_type, "mysql")) {
MOTION_LOG(DBG, TYPE_DB, NO_ERRNO, "Executing mysql query");
if (mysql_query(cnt->database, sqlquery) != 0) {
@@ -216,7 +216,7 @@ static void do_sql_query(char *sqlquery, struct context *cnt, int save_id)
cnt->database_event_id = (unsigned long long) mysql_insert_id(cnt->database);
}
}
#endif /* HAVE_MYSQL */
#endif /* HAVE_MYSQL HAVE_MARIADB*/
#ifdef HAVE_PGSQL
@@ -350,7 +350,7 @@ static void event_sqlfileclose(struct context *cnt, motion_event type ATTRIBUTE
}
}
#endif /* defined HAVE_MYSQL || defined HAVE_PGSQL || defined(HAVE_SQLITE3) */
#endif /* defined HAVE_MYSQL || defined HAVE_PGSQL || defined(HAVE_SQLITE3) || defined(HAVE_MARIADB) */
static void on_area_command(struct context *cnt,
motion_event type ATTRIBUTE_UNUSED,
@@ -1273,7 +1273,7 @@ struct event_handlers {
};
struct event_handlers event_handlers[] = {
#if defined(HAVE_MYSQL) || defined(HAVE_PGSQL) || defined(HAVE_SQLITE3)
#if defined(HAVE_MYSQL) || defined(HAVE_PGSQL) || defined(HAVE_SQLITE3) || defined(HAVE_MARIADB)
{
EVENT_FILECREATE,
event_sqlnewfile
@@ -1299,7 +1299,7 @@ struct event_handlers event_handlers[] = {
EVENT_AREA_DETECTED,
on_area_command
},
#if defined(HAVE_MYSQL) || defined(HAVE_PGSQL) || defined(HAVE_SQLITE3)
#if defined(HAVE_MYSQL) || defined(HAVE_PGSQL) || defined(HAVE_SQLITE3) || defined(HAVE_MARIADB)
{
EVENT_FIRSTMOTION,
event_sqlfirstmotion
@@ -1371,7 +1371,7 @@ struct event_handlers event_handlers[] = {
EVENT_TIMELAPSEEND,
event_ffmpeg_timelapseend
},
#if defined(HAVE_MYSQL) || defined(HAVE_PGSQL) || defined(HAVE_SQLITE3)
#if defined(HAVE_MYSQL) || defined(HAVE_PGSQL) || defined(HAVE_SQLITE3) || defined(HAVE_MARIADB)
{
EVENT_FILECLOSE,
event_sqlfileclose

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@@ -11,6 +11,12 @@
*
*/
#include "translate.h"
#include "motion.h"
#include "rotate.h"
#ifdef HAVE_MMAL
#include "interface/vcos/vcos.h"
#include "interface/mmal/mmal.h"
#include "interface/mmal/mmal_buffer.h"
@@ -21,10 +27,6 @@
#include "interface/mmal/util/mmal_connection.h"
#include "raspicam/RaspiCamControl.h"
#include "translate.h"
#include "motion.h"
#include "rotate.h"
#define MMALCAM_OK 0
#define MMALCAM_ERROR -1
@@ -421,3 +423,5 @@ int mmalcam_next(struct context *cnt, struct image_data *img_data)
return 0;
}
#endif

View File

View File

View File

@@ -967,21 +967,22 @@ static void mot_stream_deinit(struct context *cnt){
/* TODO: dbse functions are to be moved to separate module in future change*/
static void dbse_global_deinit(void){
MOTION_LOG(DBG, TYPE_ALL, NO_ERRNO, _("Closing MYSQL"));
#ifdef HAVE_MYSQL
#if defined(HAVE_MYSQL) || defined(HAVE_MARIADB)
mysql_library_end();
#endif /* HAVE_MYSQL */
#endif /* HAVE_MYSQL HAVE_MARIADB */
}
static void dbse_global_init(void){
MOTION_LOG(DBG, TYPE_DB, NO_ERRNO,_("Initializing database"));
/* Initialize all the database items */
#ifdef HAVE_MYSQL
#if defined(HAVE_MYSQL) || defined(HAVE_MARIADB)
if (mysql_library_init(0, NULL, NULL)) {
fprintf(stderr, "could not initialize MySQL library\n");
exit(1);
}
#endif /* HAVE_MYSQL */
#endif /* HAVE_MYSQL HAVE_MARIADB */
#ifdef HAVE_SQLITE3
int indx;
@@ -1026,7 +1027,7 @@ static void dbse_global_init(void){
static int dbse_init_mysql(struct context *cnt){
#ifdef HAVE_MYSQL
#if defined(HAVE_MYSQL) || defined(HAVE_MARIADB)
if ((!strcmp(cnt->conf.database_type, "mysql")) && (cnt->conf.database_dbname)) {
// close database to be sure that we are not leaking
mysql_close(cnt->database);
@@ -1052,7 +1053,7 @@ static int dbse_init_mysql(struct context *cnt){
}
#else
(void)cnt; /* Avoid compiler warnings */
#endif /* HAVE_MYSQL */
#endif /* HAVE_MYSQL HAVE_MARIADB */
return 0;
@@ -1150,12 +1151,12 @@ static int dbse_init(struct context *cnt){
static void dbse_deinit(struct context *cnt){
if (cnt->conf.database_type) {
#ifdef HAVE_MYSQL
#if defined(HAVE_MYSQL) || defined(HAVE_MARIADB)
if ( (!strcmp(cnt->conf.database_type, "mysql")) && (cnt->conf.database_dbname)) {
mysql_close(cnt->database);
cnt->database_event_id = 0;
}
#endif /* HAVE_MYSQL */
#endif /* HAVE_MYSQL HAVE_MARIADB */
#ifdef HAVE_PGSQL
if ((!strcmp(cnt->conf.database_type, "postgresql")) && (cnt->conf.database_dbname)) {
@@ -3187,6 +3188,12 @@ static void motion_ntc(void){
MOTION_LOG(DBG, TYPE_DB, NO_ERRNO,_("mysql : not available"));
#endif
#ifdef HAVE_MARIADB
MOTION_LOG(DBG, TYPE_DB, NO_ERRNO,_("MariaDB: available"));
#else
MOTION_LOG(DBG, TYPE_DB, NO_ERRNO,_("MariaDB: not available"));
#endif
#ifdef HAVE_SQLITE3
MOTION_LOG(DBG, TYPE_DB, NO_ERRNO,_("sqlite3: available"));
#else
@@ -3199,7 +3206,7 @@ static void motion_ntc(void){
MOTION_LOG(DBG, TYPE_DB, NO_ERRNO,_("pgsql : not available"));
#endif
#ifdef HAVE_INTL
#ifdef HAVE_GETTEXT
MOTION_LOG(DBG, TYPE_DB, NO_ERRNO,_("nls : available"));
#else
MOTION_LOG(DBG, TYPE_DB, NO_ERRNO,_("nls : not available"));

View File

@@ -17,7 +17,7 @@ struct image_data;
#include "config.h"
/* Includes */
#ifdef HAVE_MYSQL
#if defined(HAVE_MYSQL) || defined(HAVE_MARIADB)
#include <mysql.h>
#endif
@@ -53,8 +53,8 @@ struct image_data;
#include <pthread.h>
#include <microhttpd.h>
#if defined(BSD) && !defined(__APPLE__)
#include <pthread_np.h>
#if defined(HAVE_PTHREAD_NP_H)
#include <pthread_np.h>
#endif
#include "logger.h"
@@ -460,7 +460,7 @@ struct context {
sqlite3 *database_sqlite3;
#endif
#ifdef HAVE_MYSQL
#if defined(HAVE_MYSQL) || defined(HAVE_MARIADB)
MYSQL *database;
#endif

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

View File

@@ -11,7 +11,7 @@
#include "translate.h"
void translate_locale_chg(const char *langcd){
#ifdef HAVE_INTL
#ifdef HAVE_GETTEXT
/* This routine is for development testing only. It is not used for
* regular users because once this locale is change, it changes the
* whole computer over to the new locale. Therefore, we just return
@@ -27,7 +27,7 @@ void translate_locale_chg(const char *langcd){
}
void translate_init(void){
#ifdef HAVE_INTL
#ifdef HAVE_GETTEXT
/* Set the flag to enable native language support */
nls_enabled = 1;
@@ -52,7 +52,7 @@ void translate_init(void){
}
char* translate_text(const char *msgid){
#ifdef HAVE_INTL
#ifdef HAVE_GETTEXT
if (nls_enabled){
return (char*)gettext(msgid);
} else {

View File

@@ -12,7 +12,7 @@
int nls_enabled;
#ifdef HAVE_INTL
#ifdef HAVE_GETTEXT
# include <libintl.h>
extern int _nl_msg_cat_cntr; /* Required for changing the locale dynamically */
#endif

View File

@@ -17,11 +17,16 @@
#include <sys/mman.h>
#if defined(__NetBSD__) || defined(__OpenBSD__)
#include <dev/ic/bt8xx.h>
#else
#include <dev/bktr/ioctl_meteor.h>
#include <dev/bktr/ioctl_bt848.h>
#if defined(HAVE_DEV_IC_BT8XX_H)
#include <dev/ic/bt8xx.h>
#endif
#if defined(HAVE_DEV_BKTR_IOCTL_METEOR_H)
#include <dev/bktr/ioctl_meteor.h>
#endif
#if defined(HAVE_DEV_BKTR_IOCTL_BT848_H)
#include <dev/bktr/ioctl_bt848.h>
#endif
#define array_elem(x) (sizeof(x) / sizeof((x)[0]))

View File

Some files were not shown because too many files have changed in this diff Show More