packages: Fix pps-tools build
[openwrt/svn-archive/archive.git] / utils / pps-tools / Makefile
1 #
2 # Copyright (C) 2008 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8
9 include $(TOPDIR)/rules.mk
10 include $(INCLUDE_DIR)/kernel.mk
11
12 PKG_NAME:=pps-tools
13 PKG_VERSION:=2.6.23
14 PKG_RELEASE:=1
15
16 include $(INCLUDE_DIR)/package.mk
17
18 define Package/pps-tools
19 SUBMENU:=Time Synchronization
20 SECTION:=net
21 CATEGORY:=Network
22 DEPENDS:=@LINUX_2_6_23
23 TITLE:=PPS (Pulse Per Second) Userland tools
24 URL:=http://wiki.enneenne.com/index.php/LinuxPPS_support
25 endef
26
27
28 define Package/pps-tools/description
29 Userland tools for GPS and DCF-77 Clock syncronization. PPS support in Kernel must be enabled.
30 endef
31
32 define Build/InstallDev
33 $(INSTALL_DIR) $(1)/usr/include
34 $(CP) $(PKG_BUILD_DIR)/timepps.h $(1)/usr/include/
35 endef
36
37 define Build/Compile
38 $(MAKE) -C $(PKG_BUILD_DIR) \
39 $(TARGET_CONFIGURE_OPTS) \
40 CFLAGS="$(TARGET_CFLAGS) -DHAVE_ISC_READER=1 -I$(LINUX_DIR)/include -I ." \
41 BINDIR="/usr/sbin" MANDIR="/usr/man"
42 endef
43
44 define Package/pps-tools/install
45 $(INSTALL_DIR) $(1)/usr/sbin
46 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ppstest $(1)/usr/sbin/
47 $(INSTALL_BIN) $(PKG_BUILD_DIR)/ppsctl $(1)/usr/sbin/
48 endef
49
50 $(eval $(call BuildPackage,pps-tools))