diff --git a/.gitignore b/.gitignore index c66f03b16..a79d23169 100644 --- a/.gitignore +++ b/.gitignore @@ -26,6 +26,7 @@ m4/* misc/apache.conf misc/com.zoneminder.systemctl.policy misc/com.zoneminder.systemctl.rules +misc/libzm.pc misc/logrotate.conf misc/syslog.conf misc/plugins.conf @@ -64,7 +65,6 @@ src/.libs/ src/*.la src/*.lo src/*.o -src/libzmplugins.pc src/zm_config.h src/zm_config_defines.h src/zma diff --git a/configure.ac b/configure.ac index 362914e5d..513cafedf 100644 --- a/configure.ac +++ b/configure.ac @@ -600,7 +600,7 @@ fi AC_SUBST(PERL_MM_PARMS) AC_SUBST(EXTRA_PERL_LIB) -AC_CONFIG_FILES([Makefile zm.conf zmconfgen.pl db/Makefile db/zm_create.sql misc/Makefile misc/apache.conf misc/logrotate.conf misc/syslog.conf misc/com.zoneminder.systemctl.policy misc/com.zoneminder.systemctl.rules misc/plugins.conf onvif/Makefile onvif/scripts/Makefile scripts/Makefile scripts/zm scripts/zmaudit.pl scripts/zmcontrol.pl scripts/zmdc.pl scripts/zmfilter.pl scripts/zmpkg.pl scripts/zmtrack.pl scripts/zmcamtool.pl scripts/zmsystemctl.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl scripts/zmdbbackup scripts/zmdbrestore scripts/zmeventdump scripts/zmlogrotate.conf scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm src/Makefile src/zm_config.h src/libzmplugins.pc web/Makefile web/ajax/Makefile web/css/Makefile web/graphics/Makefile web/includes/Makefile web/includes/config.php web/js/Makefile web/lang/Makefile web/skins/Makefile web/skins/classic/Makefile web/skins/classic/ajax/Makefile web/skins/classic/css/Makefile web/skins/classic/css/classic/Makefile web/skins/classic/css/classic/views/Makefile web/skins/classic/css/flat/Makefile web/skins/classic/css/flat/views/Makefile web/skins/classic/graphics/Makefile web/skins/classic/includes/Makefile web/skins/classic/js/Makefile web/skins/classic/lang/Makefile web/skins/classic/views/Makefile web/skins/classic/views/js/Makefile web/skins/mobile/Makefile web/skins/mobile/ajax/Makefile web/skins/mobile/css/Makefile web/skins/mobile/graphics/Makefile web/skins/mobile/includes/Makefile web/skins/mobile/lang/Makefile web/skins/mobile/views/Makefile web/skins/mobile/views/css/Makefile web/tools/Makefile web/tools/mootools/Makefile web/views/Makefile web/skins/xml/Makefile web/skins/xml/views/Makefile web/skins/xml/includes/Makefile]) +AC_CONFIG_FILES([Makefile zm.conf zmconfgen.pl db/Makefile db/zm_create.sql misc/Makefile misc/apache.conf misc/libzm.pc misc/logrotate.conf misc/syslog.conf misc/com.zoneminder.systemctl.policy misc/com.zoneminder.systemctl.rules misc/plugins.conf onvif/Makefile onvif/scripts/Makefile scripts/Makefile scripts/zm scripts/zmaudit.pl scripts/zmcontrol.pl scripts/zmdc.pl scripts/zmfilter.pl scripts/zmpkg.pl scripts/zmtrack.pl scripts/zmcamtool.pl scripts/zmsystemctl.pl scripts/zmtrigger.pl scripts/zmupdate.pl scripts/zmvideo.pl scripts/zmwatch.pl scripts/zmx10.pl scripts/zmdbbackup scripts/zmdbrestore scripts/zmeventdump scripts/zmlogrotate.conf scripts/ZoneMinder/lib/ZoneMinder/Base.pm scripts/ZoneMinder/lib/ZoneMinder/Config.pm scripts/ZoneMinder/lib/ZoneMinder/Memory.pm scripts/ZoneMinder/lib/ZoneMinder/ConfigData.pm src/Makefile src/zm_config.h web/Makefile web/ajax/Makefile web/css/Makefile web/graphics/Makefile web/includes/Makefile web/includes/config.php web/js/Makefile web/lang/Makefile web/skins/Makefile web/skins/classic/Makefile web/skins/classic/ajax/Makefile web/skins/classic/css/Makefile web/skins/classic/css/classic/Makefile web/skins/classic/css/classic/views/Makefile web/skins/classic/css/flat/Makefile web/skins/classic/css/flat/views/Makefile web/skins/classic/graphics/Makefile web/skins/classic/includes/Makefile web/skins/classic/js/Makefile web/skins/classic/lang/Makefile web/skins/classic/views/Makefile web/skins/classic/views/js/Makefile web/skins/mobile/Makefile web/skins/mobile/ajax/Makefile web/skins/mobile/css/Makefile web/skins/mobile/graphics/Makefile web/skins/mobile/includes/Makefile web/skins/mobile/lang/Makefile web/skins/mobile/views/Makefile web/skins/mobile/views/css/Makefile web/tools/Makefile web/tools/mootools/Makefile web/views/Makefile web/skins/xml/Makefile web/skins/xml/views/Makefile web/skins/xml/includes/Makefile]) # Create the definitions for compilation and defaults for the database AC_CONFIG_COMMANDS([src/zm_config_defines.h],[perl ./zmconfgen.pl]) diff --git a/distros/debian/control b/distros/debian/control index 4bcac7f1a..edf15560c 100644 --- a/distros/debian/control +++ b/distros/debian/control @@ -39,10 +39,10 @@ Description: Debugging symbols for zoneminder. and surveillance. It can also be integrated into a home automation system via X.10 or other protocols. -Package: zoneminder-dev +Package: libzoneminder-dev Section: libdevel Architecture: any -Depends: zoneminder (= ${binary:Version}), ${misc:Depends} +Depends: ${misc:Depends} Description: Development files for ZoneMinder plugins This package add the necessary files to develop video analysis plugins for the ZoneMinder camera security and surveillance solution. diff --git a/distros/debian/libzoneminder-dev.install b/distros/debian/libzoneminder-dev.install new file mode 100644 index 000000000..229d6aa7d --- /dev/null +++ b/distros/debian/libzoneminder-dev.install @@ -0,0 +1,3 @@ +usr/include/zoneminder/* +usr/lib/*/libzm.a +usr/lib/*/pkgconfig/libzm.pc diff --git a/distros/debian/zoneminder-dev.install b/distros/debian/zoneminder-dev.install deleted file mode 100644 index 2bc6d91ab..000000000 --- a/distros/debian/zoneminder-dev.install +++ /dev/null @@ -1,3 +0,0 @@ -usr/include/zoneminder/* -usr/lib/*/libzmplugins.a -usr/lib/*/pkgconfig/libzmplugins.pc diff --git a/distros/debian/dirs b/distros/debian/zoneminder.dirs similarity index 100% rename from distros/debian/dirs rename to distros/debian/zoneminder.dirs diff --git a/distros/debian/init.d b/distros/debian/zoneminder.init similarity index 100% rename from distros/debian/init.d rename to distros/debian/zoneminder.init diff --git a/distros/debian/install b/distros/debian/zoneminder.install similarity index 100% rename from distros/debian/install rename to distros/debian/zoneminder.install diff --git a/distros/debian/links b/distros/debian/zoneminder.links similarity index 100% rename from distros/debian/links rename to distros/debian/zoneminder.links diff --git a/distros/debian/postinst b/distros/debian/zoneminder.postinst similarity index 100% rename from distros/debian/postinst rename to distros/debian/zoneminder.postinst diff --git a/distros/debian/postrm b/distros/debian/zoneminder.postrm similarity index 100% rename from distros/debian/postrm rename to distros/debian/zoneminder.postrm diff --git a/distros/debian/preinst b/distros/debian/zoneminder.preinst old mode 100755 new mode 100644 similarity index 100% rename from distros/debian/preinst rename to distros/debian/zoneminder.preinst diff --git a/distros/debian8/control b/distros/debian8/control index faa58c1a9..a378742dc 100644 --- a/distros/debian8/control +++ b/distros/debian8/control @@ -43,7 +43,7 @@ Description: Perl libraries for ZoneMinder Package: libzoneminder-dev Section: libdevel Architecture: any -Depends: ${shlibs:Depends}, ${misc:Depends} +Depends: ${misc:Depends} Description: Development library for ZoneMinder plugins ZoneMinder is a video camera security and surveillance solution. . diff --git a/distros/debian8/libzoneminder-dev.install b/distros/debian8/libzoneminder-dev.install new file mode 100644 index 000000000..451b480db --- /dev/null +++ b/distros/debian8/libzoneminder-dev.install @@ -0,0 +1,3 @@ +usr/include/zoneminder +usr/lib/*/libzm.a +usr/lib/*/pkgconfig/libzm.pc diff --git a/distros/debian8/libzoneminder-plugin-dev.install b/distros/debian8/libzoneminder-plugin-dev.install deleted file mode 100644 index 6327b3321..000000000 --- a/distros/debian8/libzoneminder-plugin-dev.install +++ /dev/null @@ -1,3 +0,0 @@ -usr/include/zoneminder -usr/lib/*/libzmplugins.a -usr/lib/*/pkgconfig/libzmplugins.pc diff --git a/misc/Makefile.am b/misc/Makefile.am index c6a4c5e89..a3bb9338a 100644 --- a/misc/Makefile.am +++ b/misc/Makefile.am @@ -6,15 +6,22 @@ EXTRA_DIST = \ syslog.conf.in \ zoneminder-tmpfiles.conf.in \ zoneminder.service.in \ - com.zoneminder.systemctl.policy.in \ - com.zoneminder.systemctl.rules.in \ - plugins.conf.in + com.zoneminder.systemctl.policy.in \ + com.zoneminder.systemctl.rules.in + +if ZM_HAS_PLUGIN_SUPPORT +EXTRA_DIST += plugins.conf.in + +# Install a pkg-config file for a proper handling of the libzm +# convenience library +pkgconfigdir = $(libdir)/pkgconfig +pkgconfig_DATA = libzm.pc + +sysconf_DATA = plugins.conf +endif polkit_actiondir = @POLKIT_PREFIX@/share/polkit-1/actions dist_polkit_action_DATA = com.zoneminder.systemctl.policy polkit_rulesdir = @POLKIT_PREFIX@/share/polkit-1/rules.d dist_polkit_rules_DATA = com.zoneminder.systemctl.rules - -sysconf_DATA = plugins.conf - diff --git a/src/libzmplugins.pc.in b/misc/libzm.pc.in similarity index 100% rename from src/libzmplugins.pc.in rename to misc/libzm.pc.in diff --git a/src/Makefile.am b/src/Makefile.am index 68b67d4ce..1df927487 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -33,7 +33,7 @@ zm_SOURCES = \ zm_exception.cpp \ zm_file_camera.cpp \ zm_ffmpeg_camera.cpp \ - zm_libvlc_camera.cpp \ + zm_libvlc_camera.cpp \ zm_local_camera.cpp \ zm_monitor.cpp \ zm_ffmpeg.cpp \ @@ -56,7 +56,7 @@ zm_SOURCES = \ zm_user.cpp \ $(SOURCES_common) -# These source files are used both for zm binaries and the libzmplugins +# These source files are used both for zm binaries and the libzm # convenience library SOURCES_common = \ zm_config.cpp \ @@ -69,7 +69,7 @@ SOURCES_common = \ zm_thread.cpp \ zm_zone.cpp -# These header files are used both for zm binaries and the libzmplugins +# These header files are used both for zm binaries and the libzm # convenience library HEADERS_common = \ jinclude.h \ @@ -101,10 +101,12 @@ zmstreamer_SOURCES = zmstreamer.cpp $(zm_SOURCES) # These libraries are linked only to zm binaries in order to avoid detection # of unwanted dependencies during plugin packaging -zm_LDADD = @DL_LIBS@ @PCRE_LIBS@ @CURL_LIBS@ @BZ2_LIBS@ @X264_LIBS@ \ - @SWSCALE_LIBS@ @AVFORMAT_LIBS@ @AVCODEC_LIBS@ @AVUTIL_LIBS@ \ - @AVDEVICE_LIBS@ @AVCORE_LIBS@ @VLC_LIBS@ @CRYPTO_LIBS@ @GCRYPT_LIBS@ \ - @GNUTLS_LIBS@ @GNUTLS_OPENSSL_LIBS@ +zm_LDADD = @DL_LIBS@ @PCRE_LIBS@ @CURL_LIBS@ @SWSCALE_LIBS@ @AVFORMAT_LIBS@ \ + @AVCODEC_LIBS@ @AVUTIL_LIBS@ @AVCORE_LIBS@ @VLC_LIBS@ @CRYPTO_LIBS@ \ + @GCRYPT_LIBS@ @GNUTLS_OPENSSL_LIBS@ + +# Additionnal libraries to be added manually if required +# BZ2_LIBS X264_LIBS AVDEVICE_LIBS GNUTLS_LIBS zmc_LDADD = $(zm_LDADD) zma_LDADD = $(zm_LDADD) @@ -123,7 +125,7 @@ noinst_HEADERS = \ zm_file_camera.h \ zm_ffmpeg_camera.h \ zm_font.h \ - zm_libvlc_camera.h \ + zm_libvlc_camera.h \ zm_local_camera.h \ zm_monitor.h \ zm_regexp.h \ @@ -151,12 +153,12 @@ zm_SOURCES += \ zm_plugin_manager.cpp # Build a convenience library for plugin development -noinst_LTLIBRARIES = libzmplugins.la -libzmplugins_la_SOURCES = zm_detector.cpp $(SOURCES_common) +noinst_LTLIBRARIES = libzm.la +libzm_la_SOURCES = zm_detector.cpp $(SOURCES_common) # A hack to avoid conflicts between objects created both with libtool -# and without (objects will be prefixed with "libzmplugins_la") -libzmplugins_la_CPPFLAGS = $(AM_CPPFLAGS) +# and without (objects will be prefixed with "libzm_la") +libzm_la_CPPFLAGS = $(AM_CPPFLAGS) # Install the necessary headers for plugin development pkginclude_HEADERS = \ @@ -165,11 +167,6 @@ pkginclude_HEADERS = \ zm_plugin.h \ zm_plugin_manager.h \ $(HEADERS_common) - -# Install a pkg-config file for a proper handling of the libzmplugins -# convenience library -pkgconfigdir = $(libdir)/pkgconfig -pkgconfig_DATA = libzmplugins.pc else # Don't intall plugin headers if no support noinst_HEADERS += \ @@ -188,14 +185,14 @@ dist-hook: @( rm $(distdir)/zm_config.h ) # Yes, you are correct. This is a HACK! -# And the manual installation of libzmplugins.a is necessary because libtool has +# And the manual installation of libzm.a is necessary because libtool has # no option to force installation of convenience libraries. install-exec-hook: ( cd $(DESTDIR)@bindir@; mkdir -p $(DESTDIR)$(cgidir); mv zms $(DESTDIR)$(cgidir) ) ( cd $(DESTDIR)$(cgidir); chown $(webuser):$(webgroup) zms; ln -f zms nph-zms ) - install -D -m 644 .libs/libzmplugins.a $(DESTDIR)$(libdir)/libzmplugins.a + install -D -m 644 .libs/libzm.a $(DESTDIR)$(libdir)/libzm.a uninstall-hook: ( cd $(DESTDIR)$(cgidir); rm -f zms nph-zms ) - ( cd $(DESTDIR)$(libdir); rm -f libzmplugins.a ) + ( cd $(DESTDIR)$(libdir); rm -f libzm.a )