linux-headers: bump 4.{4, 9}.x series
[buildroot-gz.git] / package / ptpd2 / ptpd2.mk
blobd53b13534c30d7b77330abd2ee1ae3bfa0cbe29a
1 ################################################################################
3 # ptpd2
5 ################################################################################
7 PTPD2_VERSION = ptpd-2.3.1
8 PTPD2_SITE = $(call github,ptpd,ptpd,$(PTPD2_VERSION))
9 PTPD2_DEPENDENCIES = libpcap
10 PTPD2_CONF_OPTS = --with-pcap-config=$(STAGING_DIR)/usr/bin/pcap-config
11 # configure not shipped
12 PTPD2_AUTORECONF = YES
13 PTPD2_LICENSE = BSD-2c
14 PTPD2_LICENSE_FILES = COPYRIGHT
16 ifeq ($(BR2_STATIC_LIBS),y)
17 PTPD2_CONF_OPTS += LIBS="`$(STAGING_DIR)/usr/bin/pcap-config --static --additional-libs`"
18 endif
20 ifeq ($(BR2_PACKAGE_NETSNMP),y)
21 PTPD2_CONF_ENV += ac_cv_path_PATH_NET_SNMP_CONFIG=$(STAGING_DIR)/usr/bin/net-snmp-config
22 PTPD2_DEPENDENCIES += netsnmp
23 else
24 PTPD2_CONF_OPTS += --disable-snmp
25 endif
27 # GCC bug with Os/O1/O2/O3
28 # internal compiler error: in gen_add2_insn, at optabs.c:4454
29 ifeq ($(BR2_bfin),y)
30 PTPD2_CONF_ENV += CFLAGS="$(TARGET_CFLAGS) -O0"
31 endif
33 define PTPD2_INSTALL_INIT_SYSV
34 $(INSTALL) -m 755 -D package/ptpd2/S65ptpd2 \
35 $(TARGET_DIR)/etc/init.d/S65ptpd2
36 endef
38 define PTPD2_INSTALL_INIT_SYSTEMD
39 $(INSTALL) -D -m 644 package/ptpd2/ptpd2.service \
40 $(TARGET_DIR)/usr/lib/systemd/system/ptpd2.service
41 mkdir -p $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants
42 ln -sf ../../../../usr/lib/systemd/system/ptpd2.service \
43 $(TARGET_DIR)/etc/systemd/system/multi-user.target.wants/ptpd2.service
44 endef
46 $(eval $(autotools-package))