1
0
mirror of https://git.openwrt.org/feed/packages.git synced 2024-06-13 10:59:13 +02:00
openwrt-packages/utils/pps-tools/Makefile
Matt Merhar 2a5ad04756 pps-tools: use %lld in printf for 64-bit time_t
musl 1.2.0 switched to use 64-bit time_t everywhere, including 32-bit
architectures, causing garbage values to be printed from ppswatch and
ppstest.

Use the correct format string for the affected printf statements and
explicitly cast to long long to avoid potential compatibility issues
with 32-bit glibc.

Signed-off-by: Matt Merhar <mattmerhar@protonmail.com>
2023-11-16 11:27:23 -08:00

48 lines
1.2 KiB
Makefile

#
# Copyright (C) 2014 OpenWrt.org
#
# This is free software, licensed under the GNU General Public License v2.
# See /LICENSE for more information.
#
include $(TOPDIR)/rules.mk
PKG_NAME:=pps-tools
PKG_VERSION:=1.0.2
PKG_RELEASE:=2
PKG_SOURCE_URL:=https://codeload.github.com/redlab-i/pps-tools/tar.gz/v$(PKG_VERSION)?
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_HASH:=1a7efd66152e5439b69143f1f380b40ac5decbbbef516b37a017410b8ba7dff4
PKG_MAINTAINER:=Zoltan HERPAI <wigyori@uid0.hu>
PKG_LICENSE:=GPL-2.0
include $(INCLUDE_DIR)/package.mk
define Package/pps-tools
SECTION:=utils
CATEGORY:=Utilities
TITLE:=PPS-tools
endef
define Package/pps-tools/description
Userland tools for GPS and DCF-77 Clock synchronization. PPS support in Kernel must be enabled.
endef
TARGET_CFLAGS += -I$(STAGING_DIR)/usr/include
define Build/InstallDev
$(INSTALL_DIR) $(1)/usr/include/sys
$(INSTALL_DATA) $(PKG_BUILD_DIR)/timepps.h $(1)/usr/include/sys/
endef
define Package/pps-tools/install
$(INSTALL_DIR) $(1)/usr/sbin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ppsctl $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ppstest $(1)/usr/sbin/
$(INSTALL_BIN) $(PKG_BUILD_DIR)/ppswatch $(1)/usr/sbin/
endef
$(eval $(call BuildPackage,pps-tools))