From 6a97f907a6f20b1a834a840221f7001279ecd3f4 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sun, 14 Dec 2014 20:47:56 +0100 Subject: [PATCH 01/22] Provide a debian folder to allow build of upstream package --- distros/debian/README.source | 12 ++ distros/debian/changelog | 9 + distros/debian/compat | 1 + distros/debian/control | 58 ++++++ distros/debian/copyright | 19 ++ distros/debian/docs | 2 + distros/debian/libopenalpr-dev.install | 3 + distros/debian/libopenalpr1.install | 2 + distros/debian/openalpr-daemon.default | 22 +++ distros/debian/openalpr-daemon.init | 175 ++++++++++++++++++ distros/debian/openalpr-daemon.install | 2 + distros/debian/openalpr-data.install | 1 + distros/debian/openalpr-utils.install | 6 + distros/debian/openalpr-utils.manpages | 1 + distros/debian/patches/enable_utilities.diff | 67 +++++++ .../patches/install_static_library.diff | 10 + ...make_alpr_dependent_to_shared_library.diff | 11 ++ distros/debian/patches/series | 3 + distros/debian/rules | 78 ++++++++ distros/debian/source/format | 1 + 20 files changed, 483 insertions(+) create mode 100644 distros/debian/README.source create mode 100644 distros/debian/changelog create mode 100644 distros/debian/compat create mode 100644 distros/debian/control create mode 100644 distros/debian/copyright create mode 100644 distros/debian/docs create mode 100644 distros/debian/libopenalpr-dev.install create mode 100644 distros/debian/libopenalpr1.install create mode 100644 distros/debian/openalpr-daemon.default create mode 100644 distros/debian/openalpr-daemon.init create mode 100644 distros/debian/openalpr-daemon.install create mode 100644 distros/debian/openalpr-data.install create mode 100644 distros/debian/openalpr-utils.install create mode 100644 distros/debian/openalpr-utils.manpages create mode 100644 distros/debian/patches/enable_utilities.diff create mode 100644 distros/debian/patches/install_static_library.diff create mode 100644 distros/debian/patches/make_alpr_dependent_to_shared_library.diff create mode 100644 distros/debian/patches/series create mode 100755 distros/debian/rules create mode 100644 distros/debian/source/format diff --git a/distros/debian/README.source b/distros/debian/README.source new file mode 100644 index 0000000..b546508 --- /dev/null +++ b/distros/debian/README.source @@ -0,0 +1,12 @@ +This package uses quilt to manage all modifications to the upstream source. +Changes are stored in the source package as diffs in debian/patches and applied +during the build. + +See /usr/share/doc/quilt/README.source for a detailed explanation. + + +This package uses the version 3.0 of the debian source package; An upstream +tarball is required to build it. This tarball can be generated automagically by +downloading the sources from the github repository with the following command: + +fakeroot debian/rules get-orig-source diff --git a/distros/debian/changelog b/distros/debian/changelog new file mode 100644 index 0000000..f44b35a --- /dev/null +++ b/distros/debian/changelog @@ -0,0 +1,9 @@ +openalpr (2.0.0-0.1) experimental; urgency=low + + * Non maintainer upload. + * Upstream release with several fixes: + - Compilation of utilities enabled + - installation of static library + - alpr build against shared library + + -- Emmanuel Papin Sun, 14 Dec 2014 19:39:07 +0200 diff --git a/distros/debian/compat b/distros/debian/compat new file mode 100644 index 0000000..ec63514 --- /dev/null +++ b/distros/debian/compat @@ -0,0 +1 @@ +9 diff --git a/distros/debian/control b/distros/debian/control new file mode 100644 index 0000000..65dd9ec --- /dev/null +++ b/distros/debian/control @@ -0,0 +1,58 @@ +Source: openalpr +Section: video +Priority: optional +Maintainer: Matt Hill +Build-Depends: debhelper (>= 9), libopencv-dev, libtesseract-dev, git, cmake, + build-essential, libtesseract-dev, libleptonica-dev, liblog4cplus-dev, + libcurl3-dev, uuid-dev +Standards-Version: 3.9.5 +Homepage: https://github.com/openalpr/openalpr + +Package: libopenalpr1 +Section: libs +Architecture: amd64 +Depends: openalpr-data (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Automated License Plate Recognition library (OpenALPR) + OpenALPR is an open source Automatic License Plate Recognition library written + in C++. The library analyzes images and identifies license plates. The output + is the text representation of any license plate characters found in the image. + +Package: libopenalpr-dev +Section: libdevel +Architecture: amd64 +Depends: libopenalpr1 (= ${binary:Version}), ${misc:Depends} +Description: Development files for OpenALPR library + OpenALPR is an open source Automatic License Plate Recognition library written + in C++. The library analyzes images and identifies license plates. The output + is the text representation of any license plate characters found in the image. + +Package: openalpr-data +Section: misc +Architecture: all +Depends: ${misc:Depends} +Description: Runtime data for OpenALPR library + OpenALPR is an open source Automatic License Plate Recognition library written + in C++. The library analyzes images and identifies license plates. The output + is the text representation of any license plate characters found in the image. + +Package: openalpr-daemon +Section: video +Architecture: amd64 +Depends: openalpr-data (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Daemon to run OpenALPR in the background + OpenALPR is an open source Automatic License Plate Recognition library written + in C++. The library analyzes images and identifies license plates. The output + is the text representation of any license plate characters found in the image. + The OpenALPR daemon allows you to monitor a camera stream for license plate + numbers in the background. Alprd runs as a daemon process on Linux. + The plate numbers can be streamed to another server (via HTTP posts) or can be + consumed programmatically via a beanstalkd queue. + +Package: openalpr-utils +Section: utils +Architecture: amd64 +Depends: openalpr-data (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} +Description: Utilities for the OpenALPR library + OpenALPR is an open source Automatic License Plate Recognition library written + in C++. The library analyzes images and identifies license plates. The output + is the text representation of any license plate characters found in the image. diff --git a/distros/debian/copyright b/distros/debian/copyright new file mode 100644 index 0000000..4bdd803 --- /dev/null +++ b/distros/debian/copyright @@ -0,0 +1,19 @@ +Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: openalpr +Source: https://github.com/openalpr/openalpr + +Files: * +Copyright: 2013-2015 Matt Hill +License: AGPL-3.0 + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as + published by the Free Software Foundation, either version 3 of the + License, or (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . diff --git a/distros/debian/docs b/distros/debian/docs new file mode 100644 index 0000000..f678bec --- /dev/null +++ b/distros/debian/docs @@ -0,0 +1,2 @@ +cla.txt +README.md diff --git a/distros/debian/libopenalpr-dev.install b/distros/debian/libopenalpr-dev.install new file mode 100644 index 0000000..877c682 --- /dev/null +++ b/distros/debian/libopenalpr-dev.install @@ -0,0 +1,3 @@ +usr/include/alpr.h +usr/lib/lib*.a +usr/lib/lib*so diff --git a/distros/debian/libopenalpr1.install b/distros/debian/libopenalpr1.install new file mode 100644 index 0000000..ac4ae8a --- /dev/null +++ b/distros/debian/libopenalpr1.install @@ -0,0 +1,2 @@ +usr/lib/lib*.so.* +usr/etc/openalpr/openalpr.conf etc/openalpr diff --git a/distros/debian/openalpr-daemon.default b/distros/debian/openalpr-daemon.default new file mode 100644 index 0000000..0cc67ed --- /dev/null +++ b/distros/debian/openalpr-daemon.default @@ -0,0 +1,22 @@ +# Defaults for alprd initscript +# sourced by /etc/init.d/openalpr-daemon +# installed at /etc/default/openalpr-daemon by the maintainer scripts +# +# This is a POSIX shell fragment +# +# These options can be set to modify the behavior of the openalr-daemon init script. +# The options commented out show the default values. + +# Start the daemon if set to "yes" +START_DAEMON="yes" + +# Path to the log file +#LOGFILE="/var/log/alpr.log" + +# User and group the daemon should run as +#USER="www-data" +#GROUP="www-data" + +# Additional options that are passed to the daemon +#DAEMON_OPTS="-n 20" + diff --git a/distros/debian/openalpr-daemon.init b/distros/debian/openalpr-daemon.init new file mode 100644 index 0000000..aaeb934 --- /dev/null +++ b/distros/debian/openalpr-daemon.init @@ -0,0 +1,175 @@ +#!/bin/sh +### BEGIN INIT INFO +# Provides: openalpr-daemon +# Required-Start: $local_fs $network $remote_fs $syslog +# Required-Stop: $local_fs $network $remote_fs $syslog +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: OpenALPR daemon for license plate recognition +# Description: OpenALPR daemon detects license plate in the background +### END INIT INFO + +# Author: lokidor + +unset USER + +# PATH should only include /usr/* if it runs after the mountnfs.sh script +PATH=/sbin:/usr/sbin:/bin:/usr/bin +DESC="OpenALPR daemon" +NAME=openalpr-daemon +DAEMON=/usr/bin/alprd +PIDFILE=/var/run/alprd.pid +SCRIPTNAME=/etc/init.d/$NAME +DEFAULT=/etc/default/$NAME + +# Exit if the package is not installed +[ -x "$DAEMON" ] || exit 0 + +# Read configuration variable file if it is present +[ -r $DEFAULT ] && . $DEFAULT + +# Load the VERBOSE setting and other rcS variables +. /lib/init/vars.sh + +# Define LSB log_* functions. +# Depend on lsb-base (>= 3.2-14) to ensure that this file is present +# and status_of_proc is working. +. /lib/lsb/init-functions + +# Do not start the daemon if NO_START is enabled in DEFAULT +if [ "$START_DAEMON" != "yes" ] && [ "$1" != "stop" ]; then + log_warning_msg "$NAME: Not starting $DESC." + log_warning_msg "$NAME: Disabled in $DEFAULT." + exit 0 +fi + +# Set the default log file +if [ -z $LOGFILE ]; then + LOGFILE=/var/log/alpr.log +fi + +# Set the default daemon options +if [ -z $DAEMON_OPTS ]; then + DAEMON_OPTS="-n 20" +fi + +# Run as `www-data' if USER is not specified or is `root' +if [ -z $USER ]; then + USER=www-data +fi + +# If no group is specified, use USER +if [ -z $GROUP ]; then + GROUP=$USER +fi + +DAEMON_ARGS="-l $LOGFILE $DAEMON_OPTS" + +# +# Function that starts the daemon/service +# +do_start() +{ + # Return + # 0 if daemon has been started + # 1 if daemon was already running + # 2 if daemon could not be started + [ ! -f $LOGFILE ] && touch $LOGFILE && chown $USER:$GROUP $LOGFILE \ + || return 2 + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --chuid $USER:$GROUP --exec $DAEMON --test > /dev/null \ + || return 1 + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --chuid $USER:$GROUP --exec $DAEMON -- \ + $DAEMON_ARGS \ + || return 2 +} + +# +# Function that stops the daemon/service +# +do_stop() +{ + # Return + # 0 if daemon has been stopped + # 1 if daemon was already stopped + # 2 if daemon could not be stopped + # other if a failure occurred + start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --name $NAME + RETVAL="$?" + [ "$RETVAL" = 2 ] && return 2 + # Wait for children to finish too if this is a daemon that forks + # and if the daemon is only ever run from this initscript. + # If the above conditions are not satisfied then add some other code + # that waits for the process to drop all resources that could be + # needed by services started subsequently. A last resort is to + # sleep for some time. + start-stop-daemon --stop --quiet --oknodo --retry=0/30/KILL/5 --exec $DAEMON + [ "$?" = 2 ] && return 2 + # Many daemons don't delete their pidfiles when they exit. + rm -f $PIDFILE + return "$RETVAL" +} + +# +# Function that sends a SIGHUP to the daemon/service +# +do_reload() { + # + # If the daemon can reload its configuration without + # restarting (for example, when it is sent a SIGHUP), + # then implement that here. + # + start-stop-daemon --stop --signal 1 --quiet --pidfile $PIDFILE --name $NAME + return 0 +} + +case "$1" in + start) + [ "$VERBOSE" != no ] && log_daemon_msg "Starting $DESC" "$NAME" + do_start + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + stop) + [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME" + do_stop + case "$?" in + 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;; + 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;; + esac + ;; + status) + status_of_proc "$DAEMON" "$NAME" && exit 0 || exit $? + ;; + restart|force-reload) + # + # If the "reload" option is implemented then remove the + # 'force-reload' alias + # + log_daemon_msg "Restarting $DESC" "$NAME" + do_stop + case "$?" in + 0|1) + do_start + case "$?" in + 0) log_end_msg 0 ;; + 1) log_end_msg 1 ;; # Old process is still running + *) log_end_msg 1 ;; # Failed to start + esac + ;; + *) + # Failed to stop + log_end_msg 1 + ;; + esac + ;; + *) + echo "Usage: $SCRIPTNAME {start|stop|status|restart|force-reload}" >&2 + exit 3 + ;; +esac + +: diff --git a/distros/debian/openalpr-daemon.install b/distros/debian/openalpr-daemon.install new file mode 100644 index 0000000..f14b7ee --- /dev/null +++ b/distros/debian/openalpr-daemon.install @@ -0,0 +1,2 @@ +usr/bin/alprd +usr/etc/openalpr/alprd.conf etc/openalpr diff --git a/distros/debian/openalpr-data.install b/distros/debian/openalpr-data.install new file mode 100644 index 0000000..91594f9 --- /dev/null +++ b/distros/debian/openalpr-data.install @@ -0,0 +1 @@ +usr/share/openalpr/runtime_data diff --git a/distros/debian/openalpr-utils.install b/distros/debian/openalpr-utils.install new file mode 100644 index 0000000..9822d40 --- /dev/null +++ b/distros/debian/openalpr-utils.install @@ -0,0 +1,6 @@ +usr/bin/alpr +usr/bin/sortstate-openalpr-utils +usr/bin/classifychars-openalpr-utils +usr/bin/benchmark-openalpr-utils +usr/bin/prepcharsfortraining-openalpr-utils +usr/bin/tagplates-openalpr-utils diff --git a/distros/debian/openalpr-utils.manpages b/distros/debian/openalpr-utils.manpages new file mode 100644 index 0000000..3587728 --- /dev/null +++ b/distros/debian/openalpr-utils.manpages @@ -0,0 +1 @@ +doc/man/alpr.1 diff --git a/distros/debian/patches/enable_utilities.diff b/distros/debian/patches/enable_utilities.diff new file mode 100644 index 0000000..2c00974 --- /dev/null +++ b/distros/debian/patches/enable_utilities.diff @@ -0,0 +1,67 @@ +--- a/src/misc_utilities/CMakeLists.txt ++++ b/src/misc_utilities/CMakeLists.txt +@@ -1,28 +1,28 @@ + +-ADD_EXECUTABLE( sortstate EXCLUDE_FROM_ALL sortstate.cpp ) +-TARGET_LINK_LIBRARIES(sortstate +- openalpr-static ++ADD_EXECUTABLE( sortstate-openalpr-utils sortstate.cpp ) ++TARGET_LINK_LIBRARIES(sortstate-openalpr-utils ++ openalpr + support + ${OpenCV_LIBS} + ${Tesseract_LIBRARIES} + ) + +-ADD_EXECUTABLE( classifychars EXCLUDE_FROM_ALL classifychars.cpp ) +-TARGET_LINK_LIBRARIES(classifychars +- openalpr-static ++ADD_EXECUTABLE( classifychars-openalpr-utils classifychars.cpp ) ++TARGET_LINK_LIBRARIES(classifychars-openalpr-utils ++ openalpr + support + ${OpenCV_LIBS} + ${Tesseract_LIBRARIES} + ) + + +-ADD_EXECUTABLE(benchmark EXCLUDE_FROM_ALL ++ADD_EXECUTABLE(benchmark-openalpr-utils + benchmarks/benchmark.cpp + benchmarks/benchmark_utils.cpp + benchmarks/endtoendtest.cpp + ) +-TARGET_LINK_LIBRARIES(benchmark +- openalpr-static ++TARGET_LINK_LIBRARIES(benchmark-openalpr-utils ++ openalpr + support + pthread + ${OpenCV_LIBS} +@@ -30,16 +30,22 @@ + ) + + +-ADD_EXECUTABLE( prepcharsfortraining EXCLUDE_FROM_ALL prepcharsfortraining.cpp ) +-TARGET_LINK_LIBRARIES(prepcharsfortraining ++ADD_EXECUTABLE( prepcharsfortraining-openalpr-utils prepcharsfortraining.cpp ) ++TARGET_LINK_LIBRARIES(prepcharsfortraining-openalpr-utils + support + ${OpenCV_LIBS} + ) + + +-ADD_EXECUTABLE( tagplates EXCLUDE_FROM_ALL tagplates.cpp ) +-TARGET_LINK_LIBRARIES(tagplates ++ADD_EXECUTABLE( tagplates-openalpr-utils tagplates.cpp ) ++TARGET_LINK_LIBRARIES(tagplates-openalpr-utils + support + ${OpenCV_LIBS} + ) + ++install (TARGETS sortstate-openalpr-utils DESTINATION bin) ++install (TARGETS classifychars-openalpr-utils DESTINATION bin) ++install (TARGETS benchmark-openalpr-utils DESTINATION bin) ++install (TARGETS prepcharsfortraining-openalpr-utils DESTINATION bin) ++install (TARGETS tagplates-openalpr-utils DESTINATION bin) ++ diff --git a/distros/debian/patches/install_static_library.diff b/distros/debian/patches/install_static_library.diff new file mode 100644 index 0000000..46f4c6e --- /dev/null +++ b/distros/debian/patches/install_static_library.diff @@ -0,0 +1,10 @@ +--- a/src/openalpr/CMakeLists.txt ++++ b/src/openalpr/CMakeLists.txt +@@ -47,6 +47,7 @@ + + + install (FILES alpr.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include) ++install (TARGETS openalpr-static DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) + install (TARGETS openalpr DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) + + # Add definition for default config file diff --git a/distros/debian/patches/make_alpr_dependent_to_shared_library.diff b/distros/debian/patches/make_alpr_dependent_to_shared_library.diff new file mode 100644 index 0000000..6775715 --- /dev/null +++ b/distros/debian/patches/make_alpr_dependent_to_shared_library.diff @@ -0,0 +1,11 @@ +--- a/src/CMakeLists.txt ++++ b/src/CMakeLists.txt +@@ -55,7 +55,7 @@ + ADD_EXECUTABLE( alpr main.cpp ) + + TARGET_LINK_LIBRARIES(alpr +- openalpr-static ++ openalpr + support + video + ${OpenCV_LIBS} diff --git a/distros/debian/patches/series b/distros/debian/patches/series new file mode 100644 index 0000000..e87ab72 --- /dev/null +++ b/distros/debian/patches/series @@ -0,0 +1,3 @@ +install_static_library.diff +make_alpr_dependent_to_shared_library.diff +enable_utilities.diff diff --git a/distros/debian/rules b/distros/debian/rules new file mode 100755 index 0000000..d9cedb0 --- /dev/null +++ b/distros/debian/rules @@ -0,0 +1,78 @@ +#!/usr/bin/make -f +# See debhelper(7) (uncomment to enable) +# output every command that modifies files on the build system. +#DH_VERBOSE = 1 + +# see EXAMPLES in dpkg-buildflags(1) and read /usr/share/dpkg/* +# DPKG_EXPORT_BUILDFLAGS = 1 +include /usr/share/dpkg/default.mk +# + +# These are used to get the most recent version of the original sources from github +UURL = $(shell git config --get remote.origin.url) +BRANCH = $(shell git rev-parse --abbrev-ref HEAD) +HEAD = $(shell git rev-parse HEAD) +PKD = $(shell pwd)/debian +PKG = $(word 2,$(shell dpkg-parsechangelog -l$(PKD)/changelog | grep ^Source)) +VER ?= $(shell dpkg-parsechangelog -l$(PKD)/changelog | perl -ne 'print $$1 if m{^Version:\s+(?:\d+:)?(\d.*)(?:\-\d+.*)};') +DTYPE = +TARBALL = ../$(PKG)_$(VER)$(DTYPE).orig.tar.xz + +# see FEATURE AREAS in dpkg-buildflags(1) +#export DEB_BUILD_MAINT_OPTIONS = hardening=+all + +# see ENVIRONMENT in dpkg-buildflags(1) +# package maintainers to append CFLAGS +#export DEB_CFLAGS_MAINT_APPEND = -Wall -pedantic +# package maintainers to append LDFLAGS +#export DEB_LDFLAGS_MAINT_APPEND = -Wl,--as-needed + +# main packaging script based on dh7 syntax +%: + dh $@ --sourcedirectory=src --with quilt + +# debmake generated override targets +# This is example for Cmake (See http://bugs.debian.org/641051 ) +#override_dh_auto_configure: +# dh_auto_configure -- \ +# -DCMAKE_BUILD_TYPE:STRING=Debug + +# Inspired by https://wiki.debian.org/onlyjob/get-orig-source +.PHONY: get-orig-source +get-orig-source: $(TARBALL) $(info I: $(PKG)_$(VER)$(DTYPE)) + @ + +$(TARBALL): + $(if $(wildcard $(PKG)-$(VER)),$(error folder '$(PKG)-$(VER)' exists, aborting...)) + @echo "# Cloning origin repository..."; \ + if ! git clone $(UURL) $(PKG)-$(VER); then \ + $(RM) -r $(PKG)-$(VER); \ + echo "failed to clone repository, aborting..."; \ + false; \ + fi + @if [ $(BRANCH) != "master" ]; then \ + cd $(PKG)-$(VER); \ + echo "# Not on master branch, fetching origin branch '$(BRANCH)'..."; \ + git fetch origin $(BRANCH):$(BRANCH) || false; \ + echo "# Switching to branch '$(BRANCH)'..."; \ + git checkout $(BRANCH) || false; \ + fi + @echo "# Checking local source..." + @if [ $$(cd $(PKG)-$(VER) && git rev-parse HEAD) = $(HEAD) ]; then \ + echo "even with origin, ok"; \ + true; \ + else \ + echo "not even with origin, aborting..."; \ + false; \ + fi + @echo "# Setting times..." + @cd $(PKG)-$(VER) \ + && for F in $$(git ls-tree -r --name-only HEAD | sed -e "s/\s/\*/g"); do \ + touch --no-dereference -d "$$(git log -1 --format="%ai" -- $$F)" "$$F"; \ + done + @echo "# Cleaning-up..." + cd $(PKG)-$(VER) && $(RM) -r .git + @echo "# Packing file '$(TARBALL)'..." + @find -L "$(PKG)-$(VER)" -xdev -type f -print | sort \ + | XZ_OPT="-6v" tar -caf "$(TARBALL)" -T- --owner=root --group=root --mode=a+rX \ + && $(RM) -r "$(PKG)-$(VER)" diff --git a/distros/debian/source/format b/distros/debian/source/format new file mode 100644 index 0000000..163aaf8 --- /dev/null +++ b/distros/debian/source/format @@ -0,0 +1 @@ +3.0 (quilt) From 0db9fd89f1b3db9fb51cffb0125c1c2c57a5b2d0 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sun, 14 Dec 2014 20:53:19 +0100 Subject: [PATCH 02/22] Add local options for quilt patching system --- distros/debian/source/local-options | 2 ++ 1 file changed, 2 insertions(+) create mode 100644 distros/debian/source/local-options diff --git a/distros/debian/source/local-options b/distros/debian/source/local-options new file mode 100644 index 0000000..9cdfca9 --- /dev/null +++ b/distros/debian/source/local-options @@ -0,0 +1,2 @@ +unapply-patches +abort-on-upstream-changes From 89e4037804d81c934ee7f9632931be6be12dbab8 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sun, 14 Dec 2014 21:19:07 +0100 Subject: [PATCH 03/22] Fix some lintian errors and warnings --- distros/debian/changelog | 2 +- distros/debian/control | 8 ++++---- distros/debian/copyright | 4 ++-- .../debian/{libopenalpr1.install => libopenalpr2.install} | 0 4 files changed, 7 insertions(+), 7 deletions(-) rename distros/debian/{libopenalpr1.install => libopenalpr2.install} (100%) diff --git a/distros/debian/changelog b/distros/debian/changelog index f44b35a..d2ddd09 100644 --- a/distros/debian/changelog +++ b/distros/debian/changelog @@ -1,6 +1,6 @@ openalpr (2.0.0-0.1) experimental; urgency=low - * Non maintainer upload. + * Non-maintainer upload * Upstream release with several fixes: - Compilation of utilities enabled - installation of static library diff --git a/distros/debian/control b/distros/debian/control index 65dd9ec..63ce857 100644 --- a/distros/debian/control +++ b/distros/debian/control @@ -2,13 +2,13 @@ Source: openalpr Section: video Priority: optional Maintainer: Matt Hill -Build-Depends: debhelper (>= 9), libopencv-dev, libtesseract-dev, git, cmake, - build-essential, libtesseract-dev, libleptonica-dev, liblog4cplus-dev, +Build-Depends: debhelper (>= 9), git, cmake, quilt, libopencv-dev, + libtesseract-dev, libtesseract-dev, libleptonica-dev, liblog4cplus-dev, libcurl3-dev, uuid-dev -Standards-Version: 3.9.5 +Standards-Version: 3.9.6 Homepage: https://github.com/openalpr/openalpr -Package: libopenalpr1 +Package: libopenalpr2 Section: libs Architecture: amd64 Depends: openalpr-data (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} diff --git a/distros/debian/copyright b/distros/debian/copyright index 4bdd803..addaa1e 100644 --- a/distros/debian/copyright +++ b/distros/debian/copyright @@ -9,11 +9,11 @@ License: AGPL-3.0 it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. - + . This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. - + . You should have received a copy of the GNU Affero General Public License along with this program. If not, see . diff --git a/distros/debian/libopenalpr1.install b/distros/debian/libopenalpr2.install similarity index 100% rename from distros/debian/libopenalpr1.install rename to distros/debian/libopenalpr2.install From eb011ef11e89bf37d772892cc76c67e6e0b95fff Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sun, 14 Dec 2014 21:26:16 +0100 Subject: [PATCH 04/22] Fix a lintian error introduced by previous commit --- distros/debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/debian/control b/distros/debian/control index 63ce857..76d6dbb 100644 --- a/distros/debian/control +++ b/distros/debian/control @@ -20,7 +20,7 @@ Description: Automated License Plate Recognition library (OpenALPR) Package: libopenalpr-dev Section: libdevel Architecture: amd64 -Depends: libopenalpr1 (= ${binary:Version}), ${misc:Depends} +Depends: libopenalpr2 (= ${binary:Version}), ${misc:Depends} Description: Development files for OpenALPR library OpenALPR is an open source Automatic License Plate Recognition library written in C++. The library analyzes images and identifies license plates. The output From 02d539f4e15ec86b8ceee3813475477d4ad4a4bb Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sun, 14 Dec 2014 22:51:04 +0100 Subject: [PATCH 05/22] Set some cmake variables in rules file --- distros/debian/rules | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/distros/debian/rules b/distros/debian/rules index d9cedb0..50d77ea 100755 --- a/distros/debian/rules +++ b/distros/debian/rules @@ -31,11 +31,12 @@ TARBALL = ../$(PKG)_$(VER)$(DTYPE).orig.tar.xz %: dh $@ --sourcedirectory=src --with quilt -# debmake generated override targets -# This is example for Cmake (See http://bugs.debian.org/641051 ) -#override_dh_auto_configure: -# dh_auto_configure -- \ -# -DCMAKE_BUILD_TYPE:STRING=Debug +override_dh_auto_configure: + dh_auto_configure -- \ + -DCMAKE_INSTALL_PREFIX=/usr \ + -DCMAKE_INSTALL_SYSCONFDIR=/etc \ + -DCMAKE_VERBOSE_MAKEFILE=OFF \ + -DCMAKE_COLOR_MAKEFILE=ON # Inspired by https://wiki.debian.org/onlyjob/get-orig-source .PHONY: get-orig-source From eb3743dcc990e6eeae56ba300230a8d97a56a58f Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sun, 14 Dec 2014 23:17:52 +0100 Subject: [PATCH 06/22] Fix a missing file error when building the package --- distros/debian/libopenalpr2.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/debian/libopenalpr2.install b/distros/debian/libopenalpr2.install index ac4ae8a..fdfed1d 100644 --- a/distros/debian/libopenalpr2.install +++ b/distros/debian/libopenalpr2.install @@ -1,2 +1,2 @@ usr/lib/lib*.so.* -usr/etc/openalpr/openalpr.conf etc/openalpr +etc/openalpr/openalpr.conf etc/openalpr From 5a8d70bb4e052cb6c1a864fe131f3de632622104 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Sun, 14 Dec 2014 23:27:50 +0100 Subject: [PATCH 07/22] Fix a second missing file error when building the package --- distros/debian/openalpr-daemon.install | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/debian/openalpr-daemon.install b/distros/debian/openalpr-daemon.install index f14b7ee..fc74031 100644 --- a/distros/debian/openalpr-daemon.install +++ b/distros/debian/openalpr-daemon.install @@ -1,2 +1,2 @@ usr/bin/alprd -usr/etc/openalpr/alprd.conf etc/openalpr +etc/openalpr/alprd.conf etc/openalpr From 9beb001d3ad33d4f6847caca79f61ed5cb717357 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Mon, 15 Dec 2014 00:31:34 +0100 Subject: [PATCH 08/22] Do not use not available argument when invoking alprd --- distros/debian/openalpr-daemon.default | 2 +- distros/debian/openalpr-daemon.init | 7 +------ 2 files changed, 2 insertions(+), 7 deletions(-) diff --git a/distros/debian/openalpr-daemon.default b/distros/debian/openalpr-daemon.default index 0cc67ed..555202b 100644 --- a/distros/debian/openalpr-daemon.default +++ b/distros/debian/openalpr-daemon.default @@ -18,5 +18,5 @@ START_DAEMON="yes" #GROUP="www-data" # Additional options that are passed to the daemon -#DAEMON_OPTS="-n 20" +#DAEMON_OPTS= diff --git a/distros/debian/openalpr-daemon.init b/distros/debian/openalpr-daemon.init index aaeb934..cc47983 100644 --- a/distros/debian/openalpr-daemon.init +++ b/distros/debian/openalpr-daemon.init @@ -9,7 +9,7 @@ # Description: OpenALPR daemon detects license plate in the background ### END INIT INFO -# Author: lokidor +# Author: Emmanuel Papin unset USER @@ -48,11 +48,6 @@ if [ -z $LOGFILE ]; then LOGFILE=/var/log/alpr.log fi -# Set the default daemon options -if [ -z $DAEMON_OPTS ]; then - DAEMON_OPTS="-n 20" -fi - # Run as `www-data' if USER is not specified or is `root' if [ -z $USER ]; then USER=www-data From 18f02cd2cd19b0feac06593811857ca0b834cf7e Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Mon, 15 Dec 2014 00:34:28 +0100 Subject: [PATCH 09/22] Set default user and group to daemon when running alprd --- distros/debian/openalpr-daemon.default | 4 ++-- distros/debian/openalpr-daemon.init | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/distros/debian/openalpr-daemon.default b/distros/debian/openalpr-daemon.default index 555202b..58ae8c8 100644 --- a/distros/debian/openalpr-daemon.default +++ b/distros/debian/openalpr-daemon.default @@ -14,8 +14,8 @@ START_DAEMON="yes" #LOGFILE="/var/log/alpr.log" # User and group the daemon should run as -#USER="www-data" -#GROUP="www-data" +#USER="daemon" +#GROUP="daemon" # Additional options that are passed to the daemon #DAEMON_OPTS= diff --git a/distros/debian/openalpr-daemon.init b/distros/debian/openalpr-daemon.init index cc47983..9b5dff8 100644 --- a/distros/debian/openalpr-daemon.init +++ b/distros/debian/openalpr-daemon.init @@ -48,9 +48,9 @@ if [ -z $LOGFILE ]; then LOGFILE=/var/log/alpr.log fi -# Run as `www-data' if USER is not specified or is `root' +# Run as `daemon' if USER is not specified or is `root' if [ -z $USER ]; then - USER=www-data + USER=daemon fi # If no group is specified, use USER From bb6447cd83190864fba9b0fff8e3216dad5c6411 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Mon, 15 Dec 2014 01:19:42 +0100 Subject: [PATCH 10/22] Rename data package and move openalpr.conf to it --- distros/debian/control | 24 ++++++++++++++----- ...-data.install => libopenalpr-data.install} | 1 + distros/debian/libopenalpr2.install | 1 - distros/debian/openalpr-daemon.install | 2 +- distros/debian/openalpr-utils.install | 1 - distros/debian/openalpr.install | 1 + 6 files changed, 21 insertions(+), 9 deletions(-) rename distros/debian/{openalpr-data.install => libopenalpr-data.install} (54%) create mode 100644 distros/debian/openalpr.install diff --git a/distros/debian/control b/distros/debian/control index 76d6dbb..0021d7d 100644 --- a/distros/debian/control +++ b/distros/debian/control @@ -11,7 +11,8 @@ Homepage: https://github.com/openalpr/openalpr Package: libopenalpr2 Section: libs Architecture: amd64 -Depends: openalpr-data (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} +Depends: libopenalpr-data (= ${source:Version}), ${shlibs:Depends}, + ${misc:Depends} Description: Automated License Plate Recognition library (OpenALPR) OpenALPR is an open source Automatic License Plate Recognition library written in C++. The library analyzes images and identifies license plates. The output @@ -21,16 +22,25 @@ Package: libopenalpr-dev Section: libdevel Architecture: amd64 Depends: libopenalpr2 (= ${binary:Version}), ${misc:Depends} -Description: Development files for OpenALPR library +Description: Development files for the OpenALPR library OpenALPR is an open source Automatic License Plate Recognition library written in C++. The library analyzes images and identifies license plates. The output is the text representation of any license plate characters found in the image. -Package: openalpr-data +Package: libopenalpr-data Section: misc Architecture: all Depends: ${misc:Depends} -Description: Runtime data for OpenALPR library +Description: Runtime data for the OpenALPR library + OpenALPR is an open source Automatic License Plate Recognition library written + in C++. The library analyzes images and identifies license plates. The output + is the text representation of any license plate characters found in the image. + +Package: openalpr +Section: video +Architecture: amd64 +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: Command line program to operate the OpenALPR library OpenALPR is an open source Automatic License Plate Recognition library written in C++. The library analyzes images and identifies license plates. The output is the text representation of any license plate characters found in the image. @@ -38,20 +48,22 @@ Description: Runtime data for OpenALPR library Package: openalpr-daemon Section: video Architecture: amd64 -Depends: openalpr-data (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} Description: Daemon to run OpenALPR in the background OpenALPR is an open source Automatic License Plate Recognition library written in C++. The library analyzes images and identifies license plates. The output is the text representation of any license plate characters found in the image. + . The OpenALPR daemon allows you to monitor a camera stream for license plate numbers in the background. Alprd runs as a daemon process on Linux. + . The plate numbers can be streamed to another server (via HTTP posts) or can be consumed programmatically via a beanstalkd queue. Package: openalpr-utils Section: utils Architecture: amd64 -Depends: openalpr-data (= ${source:Version}), ${shlibs:Depends}, ${misc:Depends} +Depends: ${shlibs:Depends}, ${misc:Depends} Description: Utilities for the OpenALPR library OpenALPR is an open source Automatic License Plate Recognition library written in C++. The library analyzes images and identifies license plates. The output diff --git a/distros/debian/openalpr-data.install b/distros/debian/libopenalpr-data.install similarity index 54% rename from distros/debian/openalpr-data.install rename to distros/debian/libopenalpr-data.install index 91594f9..18afd4b 100644 --- a/distros/debian/openalpr-data.install +++ b/distros/debian/libopenalpr-data.install @@ -1 +1,2 @@ +etc/openalpr/openalpr.conf usr/share/openalpr/runtime_data diff --git a/distros/debian/libopenalpr2.install b/distros/debian/libopenalpr2.install index fdfed1d..d0dbfd1 100644 --- a/distros/debian/libopenalpr2.install +++ b/distros/debian/libopenalpr2.install @@ -1,2 +1 @@ usr/lib/lib*.so.* -etc/openalpr/openalpr.conf etc/openalpr diff --git a/distros/debian/openalpr-daemon.install b/distros/debian/openalpr-daemon.install index fc74031..e13fe79 100644 --- a/distros/debian/openalpr-daemon.install +++ b/distros/debian/openalpr-daemon.install @@ -1,2 +1,2 @@ +etc/openalpr/alprd.conf usr/bin/alprd -etc/openalpr/alprd.conf etc/openalpr diff --git a/distros/debian/openalpr-utils.install b/distros/debian/openalpr-utils.install index 9822d40..ced7f19 100644 --- a/distros/debian/openalpr-utils.install +++ b/distros/debian/openalpr-utils.install @@ -1,4 +1,3 @@ -usr/bin/alpr usr/bin/sortstate-openalpr-utils usr/bin/classifychars-openalpr-utils usr/bin/benchmark-openalpr-utils diff --git a/distros/debian/openalpr.install b/distros/debian/openalpr.install new file mode 100644 index 0000000..767fdb9 --- /dev/null +++ b/distros/debian/openalpr.install @@ -0,0 +1 @@ +usr/bin/alpr From 2e4ada7832083ad0a938471bc3779db8dd3c2420 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Mon, 15 Dec 2014 01:34:36 +0100 Subject: [PATCH 11/22] Move alpr man file to right package --- distros/debian/{openalpr-utils.manpages => openalpr.manpages} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename distros/debian/{openalpr-utils.manpages => openalpr.manpages} (100%) diff --git a/distros/debian/openalpr-utils.manpages b/distros/debian/openalpr.manpages similarity index 100% rename from distros/debian/openalpr-utils.manpages rename to distros/debian/openalpr.manpages From 28c97c5e28bac8d065dfa635b3cf40e3bbfc45b0 Mon Sep 17 00:00:00 2001 From: Emmanuel Papin Date: Mon, 15 Dec 2014 01:47:27 +0100 Subject: [PATCH 12/22] Explicitly link binary packages to libopenalpr2 to force matching version --- distros/debian/control | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/distros/debian/control b/distros/debian/control index 0021d7d..5b9373f 100644 --- a/distros/debian/control +++ b/distros/debian/control @@ -39,7 +39,7 @@ Description: Runtime data for the OpenALPR library Package: openalpr Section: video Architecture: amd64 -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: libopenalpr2 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: Command line program to operate the OpenALPR library OpenALPR is an open source Automatic License Plate Recognition library written in C++. The library analyzes images and identifies license plates. The output @@ -48,7 +48,7 @@ Description: Command line program to operate the OpenALPR library Package: openalpr-daemon Section: video Architecture: amd64 -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: libopenalpr2 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: Daemon to run OpenALPR in the background OpenALPR is an open source Automatic License Plate Recognition library written in C++. The library analyzes images and identifies license plates. The output @@ -63,7 +63,7 @@ Description: Daemon to run OpenALPR in the background Package: openalpr-utils Section: utils Architecture: amd64 -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: libopenalpr2 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: Utilities for the OpenALPR library OpenALPR is an open source Automatic License Plate Recognition library written in C++. The library analyzes images and identifies license plates. The output From ff0890b486f04fc0fe073141c509e4dfcdc22187 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 15 Dec 2014 19:58:07 -0500 Subject: [PATCH 13/22] Installing openalpr static library by default --- src/openalpr/CMakeLists.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/src/openalpr/CMakeLists.txt b/src/openalpr/CMakeLists.txt index 9544380..787e336 100644 --- a/src/openalpr/CMakeLists.txt +++ b/src/openalpr/CMakeLists.txt @@ -53,6 +53,7 @@ TARGET_LINK_LIBRARIES(openalpr install (FILES alpr.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include) +install (TARGETS openalpr-static DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) install (TARGETS openalpr DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) # Add definition for default config file From b6d4d3b5368fd38a5c228e8d94468bb33bef9bc6 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 15 Dec 2014 19:59:17 -0500 Subject: [PATCH 14/22] Removed static patch (applied directly to code) --- distros/debian/patches/install_static_library.diff | 10 ---------- distros/debian/patches/series | 1 - 2 files changed, 11 deletions(-) delete mode 100644 distros/debian/patches/install_static_library.diff diff --git a/distros/debian/patches/install_static_library.diff b/distros/debian/patches/install_static_library.diff deleted file mode 100644 index 46f4c6e..0000000 --- a/distros/debian/patches/install_static_library.diff +++ /dev/null @@ -1,10 +0,0 @@ ---- a/src/openalpr/CMakeLists.txt -+++ b/src/openalpr/CMakeLists.txt -@@ -47,6 +47,7 @@ - - - install (FILES alpr.h DESTINATION ${CMAKE_INSTALL_PREFIX}/include) -+install (TARGETS openalpr-static DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) - install (TARGETS openalpr DESTINATION ${CMAKE_INSTALL_PREFIX}/lib) - - # Add definition for default config file diff --git a/distros/debian/patches/series b/distros/debian/patches/series index e87ab72..fdbd4e8 100644 --- a/distros/debian/patches/series +++ b/distros/debian/patches/series @@ -1,3 +1,2 @@ -install_static_library.diff make_alpr_dependent_to_shared_library.diff enable_utilities.diff From bcbd3b51eb80e7766dcbe0309dfa336f9726b72c Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 15 Dec 2014 20:05:29 -0500 Subject: [PATCH 15/22] Enabled utilities by default --- src/misc_utilities/CMakeLists.txt | 32 ++++++++++++++++++------------- 1 file changed, 19 insertions(+), 13 deletions(-) diff --git a/src/misc_utilities/CMakeLists.txt b/src/misc_utilities/CMakeLists.txt index d7a81ba..3f4db8e 100644 --- a/src/misc_utilities/CMakeLists.txt +++ b/src/misc_utilities/CMakeLists.txt @@ -1,28 +1,28 @@ -ADD_EXECUTABLE( sortstate EXCLUDE_FROM_ALL sortstate.cpp ) -TARGET_LINK_LIBRARIES(sortstate - openalpr-static +ADD_EXECUTABLE( sortstate-openalpr-utils sortstate.cpp ) +TARGET_LINK_LIBRARIES(sortstate-openalpr-utils + openalpr support ${OpenCV_LIBS} ${Tesseract_LIBRARIES} ) -ADD_EXECUTABLE( classifychars EXCLUDE_FROM_ALL classifychars.cpp ) -TARGET_LINK_LIBRARIES(classifychars - openalpr-static +ADD_EXECUTABLE( classifychars-openalpr-utils classifychars.cpp ) +TARGET_LINK_LIBRARIES(classifychars-openalpr-utils + openalpr support ${OpenCV_LIBS} ${Tesseract_LIBRARIES} ) -ADD_EXECUTABLE(benchmark EXCLUDE_FROM_ALL +ADD_EXECUTABLE(benchmark-openalpr-utils benchmarks/benchmark.cpp benchmarks/benchmark_utils.cpp benchmarks/endtoendtest.cpp ) -TARGET_LINK_LIBRARIES(benchmark - openalpr-static +TARGET_LINK_LIBRARIES(benchmark-openalpr-utils + openalpr support pthread ${OpenCV_LIBS} @@ -30,16 +30,22 @@ TARGET_LINK_LIBRARIES(benchmark ) -ADD_EXECUTABLE( prepcharsfortraining EXCLUDE_FROM_ALL prepcharsfortraining.cpp ) -TARGET_LINK_LIBRARIES(prepcharsfortraining +ADD_EXECUTABLE( prepcharsfortraining-openalpr-utils prepcharsfortraining.cpp ) +TARGET_LINK_LIBRARIES(prepcharsfortraining-openalpr-utils support ${OpenCV_LIBS} ) -ADD_EXECUTABLE( tagplates EXCLUDE_FROM_ALL tagplates.cpp ) -TARGET_LINK_LIBRARIES(tagplates +ADD_EXECUTABLE( tagplates-openalpr-utils tagplates.cpp ) +TARGET_LINK_LIBRARIES(tagplates-openalpr-utils support ${OpenCV_LIBS} ) +install (TARGETS sortstate-openalpr-utils DESTINATION bin) +install (TARGETS classifychars-openalpr-utils DESTINATION bin) +install (TARGETS benchmark-openalpr-utils DESTINATION bin) +install (TARGETS prepcharsfortraining-openalpr-utils DESTINATION bin) +install (TARGETS tagplates-openalpr-utils DESTINATION bin) + From 6c31e118e7c873128bf6d0200fde0cadae449686 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 15 Dec 2014 20:08:43 -0500 Subject: [PATCH 16/22] Prefaced utilities with "openalpr-utilities" --- distros/debian/openalpr-utils.install | 10 +++++----- src/misc_utilities/CMakeLists.txt | 26 +++++++++++++------------- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/distros/debian/openalpr-utils.install b/distros/debian/openalpr-utils.install index ced7f19..e534461 100644 --- a/distros/debian/openalpr-utils.install +++ b/distros/debian/openalpr-utils.install @@ -1,5 +1,5 @@ -usr/bin/sortstate-openalpr-utils -usr/bin/classifychars-openalpr-utils -usr/bin/benchmark-openalpr-utils -usr/bin/prepcharsfortraining-openalpr-utils -usr/bin/tagplates-openalpr-utils +usr/bin/openalpr-utils-sortstate +usr/bin/openalpr-utils-classifychars +usr/bin/openalpr-utils-benchmark +usr/bin/openalpr-utils-prepcharsfortraining +usr/bin/openalpr-utils-tagplates diff --git a/src/misc_utilities/CMakeLists.txt b/src/misc_utilities/CMakeLists.txt index 3f4db8e..63603e6 100644 --- a/src/misc_utilities/CMakeLists.txt +++ b/src/misc_utilities/CMakeLists.txt @@ -1,5 +1,5 @@ -ADD_EXECUTABLE( sortstate-openalpr-utils sortstate.cpp ) +ADD_EXECUTABLE( openalpr-utils-sortstate sortstate.cpp ) TARGET_LINK_LIBRARIES(sortstate-openalpr-utils openalpr support @@ -7,7 +7,7 @@ TARGET_LINK_LIBRARIES(sortstate-openalpr-utils ${Tesseract_LIBRARIES} ) -ADD_EXECUTABLE( classifychars-openalpr-utils classifychars.cpp ) +ADD_EXECUTABLE( openalpr-utils-classifychars classifychars.cpp ) TARGET_LINK_LIBRARIES(classifychars-openalpr-utils openalpr support @@ -16,12 +16,12 @@ TARGET_LINK_LIBRARIES(classifychars-openalpr-utils ) -ADD_EXECUTABLE(benchmark-openalpr-utils +ADD_EXECUTABLE(openalpr-utils-benchmark benchmarks/benchmark.cpp benchmarks/benchmark_utils.cpp benchmarks/endtoendtest.cpp ) -TARGET_LINK_LIBRARIES(benchmark-openalpr-utils +TARGET_LINK_LIBRARIES(openalpr-utils-benchmark openalpr support pthread @@ -30,22 +30,22 @@ TARGET_LINK_LIBRARIES(benchmark-openalpr-utils ) -ADD_EXECUTABLE( prepcharsfortraining-openalpr-utils prepcharsfortraining.cpp ) -TARGET_LINK_LIBRARIES(prepcharsfortraining-openalpr-utils +ADD_EXECUTABLE( openalpr-utils-prepcharsfortraining prepcharsfortraining.cpp ) +TARGET_LINK_LIBRARIES(openalpr-utils-prepcharsfortraining support ${OpenCV_LIBS} ) -ADD_EXECUTABLE( tagplates-openalpr-utils tagplates.cpp ) -TARGET_LINK_LIBRARIES(tagplates-openalpr-utils +ADD_EXECUTABLE( openalpr-utils-tagplates tagplates.cpp ) +TARGET_LINK_LIBRARIES(openalpr-utils-tagplates support ${OpenCV_LIBS} ) -install (TARGETS sortstate-openalpr-utils DESTINATION bin) -install (TARGETS classifychars-openalpr-utils DESTINATION bin) -install (TARGETS benchmark-openalpr-utils DESTINATION bin) -install (TARGETS prepcharsfortraining-openalpr-utils DESTINATION bin) -install (TARGETS tagplates-openalpr-utils DESTINATION bin) +install (TARGETS openalpr-utils-sortstate DESTINATION bin) +install (TARGETS openalpr-utils-classifychars DESTINATION bin) +install (TARGETS openalpr-utils-benchmark DESTINATION bin) +install (TARGETS openalpr-utils-prepcharsfortraining DESTINATION bin) +install (TARGETS openalpr-utils-tagplates DESTINATION bin) From 3cd8e661b9684a3884f6f90f2521383b5fdc54e8 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 15 Dec 2014 20:09:33 -0500 Subject: [PATCH 17/22] Removed add utilities patch --- distros/debian/patches/enable_utilities.diff | 67 -------------------- distros/debian/patches/series | 1 - 2 files changed, 68 deletions(-) delete mode 100644 distros/debian/patches/enable_utilities.diff diff --git a/distros/debian/patches/enable_utilities.diff b/distros/debian/patches/enable_utilities.diff deleted file mode 100644 index 2c00974..0000000 --- a/distros/debian/patches/enable_utilities.diff +++ /dev/null @@ -1,67 +0,0 @@ ---- a/src/misc_utilities/CMakeLists.txt -+++ b/src/misc_utilities/CMakeLists.txt -@@ -1,28 +1,28 @@ - --ADD_EXECUTABLE( sortstate EXCLUDE_FROM_ALL sortstate.cpp ) --TARGET_LINK_LIBRARIES(sortstate -- openalpr-static -+ADD_EXECUTABLE( sortstate-openalpr-utils sortstate.cpp ) -+TARGET_LINK_LIBRARIES(sortstate-openalpr-utils -+ openalpr - support - ${OpenCV_LIBS} - ${Tesseract_LIBRARIES} - ) - --ADD_EXECUTABLE( classifychars EXCLUDE_FROM_ALL classifychars.cpp ) --TARGET_LINK_LIBRARIES(classifychars -- openalpr-static -+ADD_EXECUTABLE( classifychars-openalpr-utils classifychars.cpp ) -+TARGET_LINK_LIBRARIES(classifychars-openalpr-utils -+ openalpr - support - ${OpenCV_LIBS} - ${Tesseract_LIBRARIES} - ) - - --ADD_EXECUTABLE(benchmark EXCLUDE_FROM_ALL -+ADD_EXECUTABLE(benchmark-openalpr-utils - benchmarks/benchmark.cpp - benchmarks/benchmark_utils.cpp - benchmarks/endtoendtest.cpp - ) --TARGET_LINK_LIBRARIES(benchmark -- openalpr-static -+TARGET_LINK_LIBRARIES(benchmark-openalpr-utils -+ openalpr - support - pthread - ${OpenCV_LIBS} -@@ -30,16 +30,22 @@ - ) - - --ADD_EXECUTABLE( prepcharsfortraining EXCLUDE_FROM_ALL prepcharsfortraining.cpp ) --TARGET_LINK_LIBRARIES(prepcharsfortraining -+ADD_EXECUTABLE( prepcharsfortraining-openalpr-utils prepcharsfortraining.cpp ) -+TARGET_LINK_LIBRARIES(prepcharsfortraining-openalpr-utils - support - ${OpenCV_LIBS} - ) - - --ADD_EXECUTABLE( tagplates EXCLUDE_FROM_ALL tagplates.cpp ) --TARGET_LINK_LIBRARIES(tagplates -+ADD_EXECUTABLE( tagplates-openalpr-utils tagplates.cpp ) -+TARGET_LINK_LIBRARIES(tagplates-openalpr-utils - support - ${OpenCV_LIBS} - ) - -+install (TARGETS sortstate-openalpr-utils DESTINATION bin) -+install (TARGETS classifychars-openalpr-utils DESTINATION bin) -+install (TARGETS benchmark-openalpr-utils DESTINATION bin) -+install (TARGETS prepcharsfortraining-openalpr-utils DESTINATION bin) -+install (TARGETS tagplates-openalpr-utils DESTINATION bin) -+ diff --git a/distros/debian/patches/series b/distros/debian/patches/series index fdbd4e8..c2f94fa 100644 --- a/distros/debian/patches/series +++ b/distros/debian/patches/series @@ -1,2 +1 @@ make_alpr_dependent_to_shared_library.diff -enable_utilities.diff From 91f1a8fe7d6c7c10090cccaf03dca3fb5395c9f7 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 15 Dec 2014 20:23:41 -0500 Subject: [PATCH 18/22] Applied path for changing openalpr-static to openalpr --- src/CMakeLists.txt | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/CMakeLists.txt b/src/CMakeLists.txt index 196e831..15f685f 100644 --- a/src/CMakeLists.txt +++ b/src/CMakeLists.txt @@ -71,7 +71,7 @@ set(CMAKE_CSS_FLAGS_RELEASE "${CMAKE_CXX_FLAGS_RELEASE} -Wall ") ADD_EXECUTABLE( alpr main.cpp ) TARGET_LINK_LIBRARIES(alpr - openalpr-static + openalpr support video ${OpenCV_LIBS} From 14339d6090ab65e55343cc611c686cfb3f0faa67 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 15 Dec 2014 20:24:16 -0500 Subject: [PATCH 19/22] Removed alpr dependency patch --- .../make_alpr_dependent_to_shared_library.diff | 11 ----------- distros/debian/patches/series | 1 - 2 files changed, 12 deletions(-) delete mode 100644 distros/debian/patches/make_alpr_dependent_to_shared_library.diff diff --git a/distros/debian/patches/make_alpr_dependent_to_shared_library.diff b/distros/debian/patches/make_alpr_dependent_to_shared_library.diff deleted file mode 100644 index 6775715..0000000 --- a/distros/debian/patches/make_alpr_dependent_to_shared_library.diff +++ /dev/null @@ -1,11 +0,0 @@ ---- a/src/CMakeLists.txt -+++ b/src/CMakeLists.txt -@@ -55,7 +55,7 @@ - ADD_EXECUTABLE( alpr main.cpp ) - - TARGET_LINK_LIBRARIES(alpr -- openalpr-static -+ openalpr - support - video - ${OpenCV_LIBS} diff --git a/distros/debian/patches/series b/distros/debian/patches/series index c2f94fa..e69de29 100644 --- a/distros/debian/patches/series +++ b/distros/debian/patches/series @@ -1 +0,0 @@ -make_alpr_dependent_to_shared_library.diff From a37d7a95888e002d6e33a166633fc54a6437f935 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 15 Dec 2014 20:56:58 -0500 Subject: [PATCH 20/22] Updated names to be prefixed with openalpr-utils- --- src/misc_utilities/CMakeLists.txt | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/misc_utilities/CMakeLists.txt b/src/misc_utilities/CMakeLists.txt index 63603e6..108fa67 100644 --- a/src/misc_utilities/CMakeLists.txt +++ b/src/misc_utilities/CMakeLists.txt @@ -1,6 +1,6 @@ ADD_EXECUTABLE( openalpr-utils-sortstate sortstate.cpp ) -TARGET_LINK_LIBRARIES(sortstate-openalpr-utils +TARGET_LINK_LIBRARIES(openalpr-utils-sortstate openalpr support ${OpenCV_LIBS} @@ -8,7 +8,7 @@ TARGET_LINK_LIBRARIES(sortstate-openalpr-utils ) ADD_EXECUTABLE( openalpr-utils-classifychars classifychars.cpp ) -TARGET_LINK_LIBRARIES(classifychars-openalpr-utils +TARGET_LINK_LIBRARIES(openalpr-utils-classifychars openalpr support ${OpenCV_LIBS} From aa1ec2f4fbf6221979899a87c8e311f75eb28830 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 15 Dec 2014 22:48:47 -0500 Subject: [PATCH 21/22] Updated Maintainer to match GPG key --- distros/debian/control | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/distros/debian/control b/distros/debian/control index 5b9373f..e087158 100644 --- a/distros/debian/control +++ b/distros/debian/control @@ -1,7 +1,7 @@ Source: openalpr Section: video Priority: optional -Maintainer: Matt Hill +Maintainer: Matthew Hill Build-Depends: debhelper (>= 9), git, cmake, quilt, libopencv-dev, libtesseract-dev, libtesseract-dev, libleptonica-dev, liblog4cplus-dev, libcurl3-dev, uuid-dev From 956825c05dec261dd4c190e37317ccdfe1887e15 Mon Sep 17 00:00:00 2001 From: Matt Hill Date: Mon, 15 Dec 2014 22:48:59 -0500 Subject: [PATCH 22/22] Added changelog to test --- distros/debian/changelog | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/distros/debian/changelog b/distros/debian/changelog index d2ddd09..8900882 100644 --- a/distros/debian/changelog +++ b/distros/debian/changelog @@ -1,3 +1,11 @@ +openalpr (2.0.0-0.2) experimental; urgency=low + + * Non-maintainer upload + * Upstream release with several fixes: + - Merged Emmanuel's patches into the OpenALPR library + + -- Matthew Hill Mon, 15 Dec 2014 22:28:48 -0500 + openalpr (2.0.0-0.1) experimental; urgency=low * Non-maintainer upload