Makefile 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485
  1. # $OpenBSD: Makefile,v 1.13 2016/09/23 09:16:56 sthen Exp $
  2. COMMENT= motion detection software for video
  3. GH_ACCOUNT= Mr-Dave
  4. GH_PROJECT= motion
  5. GH_COMMIT= 9b4c16cae0ea77950cc156a9c82947ac51825f68
  6. V= 3.4.1
  7. REVISION= 3
  8. DISTNAME= motion-$V
  9. CATEGORIES= multimedia
  10. # there are several different forks at the moment which will hopefully
  11. # be re-merged at some point; we are tracking the version from
  12. # https://github.com/Mr-Dave/motion
  13. HOMEPAGE= http://www.lavrsen.dk/foswiki/bin/view/Motion/
  14. MAINTAINER= Stuart Henderson <sthen@openbsd.org>
  15. # GPL (according to source files, v2 only. website says v2+).
  16. PERMIT_PACKAGE_CDROM= Yes
  17. WANTLIB += SDL avcodec avformat avutil c jpeg m pthread sqlite3 swscale
  18. FLAVOR?=
  19. FLAVORS= bktr mysql pgsql
  20. LIB_DEPENDS= databases/sqlite3 \
  21. graphics/jpeg \
  22. graphics/ffmpeg
  23. FAKE_FLAGS= docdir=${PREFIX}/share/doc/motion \
  24. examplesdir=${PREFIX}/share/examples/motion
  25. USE_GMAKE= Yes
  26. CONFIGURE_STYLE= autoconf
  27. BUILD_DEPENDS+= ${MODGNU_AUTOCONF_DEPENDS} \
  28. ${MODGNU_AUTOMAKE_DEPENDS}
  29. AUTOCONF_VERSION= 2.69
  30. AUTOMAKE_VERSION= 1.15
  31. CONFIGURE_ARGS= --without-optimizecpu \
  32. LDFLAGS="-L${LOCALBASE}/lib" \
  33. CPPFLAGS="-I${LOCALBASE}/include"
  34. .if ${FLAVOR:L:Mbktr}
  35. CONFIGURE_ARGS+= --without-v4l
  36. .endif
  37. .if ${FLAVOR:L:Mmysql}
  38. LIB_DEPENDS+= databases/mariadb
  39. WANTLIB+= lib/mysql/mysqlclient z
  40. .else
  41. CONFIGURE_ARGS+= --without-mysql
  42. .endif
  43. .if ${FLAVOR:L:Mpgsql}
  44. LIB_DEPENDS+= databases/postgresql
  45. WANTLIB+= pq
  46. CONFIGURE_ARGS+= --with-pgsql-lib=${LOCALBASE}/lib
  47. .else
  48. CONFIGURE_ARGS+= --without-pgsql
  49. .endif
  50. NO_TEST= Yes
  51. post-extract:
  52. printf '#!/bin/sh\necho -n "$V-Git-${GH_COMMIT:C/[0-9a-f]{33}$//}"\n' > ${WRKSRC}/version.sh
  53. post-patch:
  54. cd ${WRKSRC} && AUTOCONF_VERSION=${AUTOCONF_VERSION} \
  55. AUTOMAKE_VERSION=${AUTOMAKE_VERSION} autoreconf -fiv
  56. pre-configure:
  57. perl -pi -e s,/usr/local/etc,${SYSCONFDIR},g \
  58. ${WRKSRC}/motion-dist.conf.in
  59. .include <bsd.port.arch.mk>
  60. .if ${ARCH:Mamd64}
  61. CFLAGS+= -mfpmath=sse -msse3
  62. .endif
  63. .include <bsd.port.mk>