Makefile 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879
  1. # $OpenBSD: Makefile,v 1.64 2017/06/15 00:41:06 schwarze Exp $
  2. COMMENT-main= service daemon that monitors one or more GPSes
  3. COMMENT-x11= GUI test apps using gpsd
  4. COMMENT-php= web-based gpsd monitor in php
  5. VERSION= 2.95
  6. DISTNAME= gpsd-${VERSION}
  7. PKGNAME-main= gpsd-${VERSION}
  8. PKGNAME-x11= gpsd-x11-${VERSION}
  9. PKGNAME-php= gpsd-php-${VERSION}
  10. SHARED_LIBS= gps 19.0 \
  11. gpsd 0.0
  12. CATEGORIES= misc geo
  13. REVISION-main= 8
  14. REVISION-php= 8
  15. REVISION-x11= 3
  16. HOMEPAGE= http://www.catb.org/gpsd/
  17. # BSD
  18. PERMIT_PACKAGE_CDROM= Yes
  19. MASTER_SITES= ${MASTER_SITE_SOURCEFORGE:=gpsd.berlios/} \
  20. ${MASTER_SITE_SAVANNAH:=gpsd/}
  21. MODULES += lang/python lang/php
  22. MODPHP_BUILDDEP= No
  23. CONFIGURE_STYLE= gnu
  24. CONFIGURE_ARGS+= --disable-ntpshm \
  25. --enable-gpsd-user=_gpsd \
  26. --enable-tnt \
  27. --enable-oceanserver
  28. PSEUDO_FLAVORS = no_x11
  29. FLAVOR?=
  30. MULTI_PACKAGES= -main -php -x11
  31. BUILD_DEPENDS= textproc/docbook-xsl
  32. RUN_DEPENDS-main= ${MODPY_RUN_DEPENDS}
  33. LIB_DEPENDS-main= devel/libusb1
  34. RUN_DEPENDS-x11 = ${BASE_PKGPATH}
  35. .include <bsd.port.arch.mk>
  36. .if ${BUILD_PACKAGES:M-x11}
  37. CONFIGURE_ENV+= CPPFLAGS="-I${X11BASE}/include -I${LOCALBASE}/include" \
  38. LDFLAGS="-L${X11BASE}/lib -L${LOCALBASE}/lib -lm -pthread -lutil"
  39. .else
  40. CONFIGURE_ARGS+= --without-x
  41. CONFIGURE_ENV += LDFLAGS="-lm -pthread -lutil"
  42. .endif
  43. WANTLIB-main= m ncurses c pthread ${LIBCXX} usb-1.0 util ${MODPY_WANTLIB}
  44. # the php display script doesn't depend on having any of gpsd around,
  45. # it just sits there and looks pretty.
  46. PKG_ARCH-php= *
  47. RUN_DEPENDS-php= lang/php/${MODPHP_VERSION},-gd
  48. PREFIX-php= ${VARBASE}/www/
  49. PYTHON_SCRIPTS= gpsprof gps/gps.py gpsfake gpscat xgps gpsspeed
  50. pre-configure:
  51. .for file in ${PYTHON_SCRIPTS}
  52. perl -pi -e 's,/usr/bin/env python,${MODPY_BIN},g' ${WRKSRC}/${file}
  53. .endfor
  54. post-install:
  55. ${INSTALL_DATA_DIR} ${WRKINST}/var/www/gpsd
  56. ${INSTALL_SCRIPT} ${WRKSRC}/gpsd.php ${WRKINST}/var/www/gpsd
  57. ${INSTALL_DATA} ${WRKSRC}/gpsd_config.h ${PREFIX}/include
  58. .include <bsd.port.mk>