aboutsummaryrefslogtreecommitdiffstats
path: root/package/openntpd/Makefile
diff options
context:
space:
mode:
authorNicolas Thill <nico@openwrt.org>2005-05-18 15:14:13 +0000
committerNicolas Thill <nico@openwrt.org>2005-05-18 15:14:13 +0000
commitc6ff935d9219df938e86a6c0a13e252994fdf537 (patch)
treea707e4379f9517a7813337953aef818a45d0937b /package/openntpd/Makefile
parent1557a74f95e83a10b0616a26b9f1debed21719ac (diff)
downloadupstream-c6ff935d9219df938e86a6c0a13e252994fdf537.tar.gz
upstream-c6ff935d9219df938e86a6c0a13e252994fdf537.tar.bz2
upstream-c6ff935d9219df938e86a6c0a13e252994fdf537.zip
Convert openntpd to new packaging style
git-svn-id: svn://svn.openwrt.org/openwrt/trunk/openwrt@937 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/openntpd/Makefile')
-rw-r--r--package/openntpd/Makefile84
1 files changed, 38 insertions, 46 deletions
diff --git a/package/openntpd/Makefile b/package/openntpd/Makefile
index 59b504fa4a..5902da95bb 100644
--- a/package/openntpd/Makefile
+++ b/package/openntpd/Makefile
@@ -11,62 +11,54 @@ PKG_MD5SUM:=4584f226523776a3cdd2fb6f8212ba8d
PKG_SOURCE_URL:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/ \
ftp://ftp.de.openbsd.org/pub/unix/OpenBSD/OpenNTPD/
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
PKG_CAT:=zcat
-PKG_IPK:=$(PACKAGE_DIR)/$(PKG_NAME)_$(PKG_VERSION)-$(PKG_RELEASE)_$(ARCH).ipk
-PKG_IPK_DIR:=$(PKG_BUILD_DIR)/ipkg
-$(DL_DIR)/$(PKG_SOURCE):
- $(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
+PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
+
+include $(TOPDIR)/package/rules.mk
-$(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE)
- $(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- touch $(PKG_BUILD_DIR)/.unpacked
+$(eval $(call PKG_template,OPENNTPD,openntpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
-$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
- (cd $(PKG_BUILD_DIR); rm -rf config.cache; \
+$(PKG_BUILD_DIR)/.configured:
+ (cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
$(TARGET_CONFIGURE_OPTS) \
CFLAGS="$(TARGET_CFLAGS)" \
./configure \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/usr \
- --exec-prefix=/usr \
- --bindir=/usr/bin \
- --sbindir=/usr/sbin \
- --libexecdir=/usr/lib \
- --sysconfdir=/etc \
- --datadir=/usr/share \
- --localstatedir=/var \
- --mandir=/usr/man \
- --infodir=/usr/info \
- --with-builtin-arc4random \
- --with-privsep-user=ntp \
+ --target=$(GNU_TARGET_NAME) \
+ --host=$(GNU_TARGET_NAME) \
+ --build=$(GNU_HOST_NAME) \
+ --program-prefix="" \
+ --program-suffix="" \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --datadir=/usr/share \
+ --includedir=/usr/include \
+ --infodir=/usr/share/info \
+ --libdir=/usr/lib \
+ --libexecdir=/usr/lib \
+ --localstatedir=/var \
+ --mandir=/usr/share/man \
+ --sbindir=/usr/sbin \
+ --sysconfdir=/etc \
+ $(DISABLE_LARGEFILE) \
+ $(DISABLE_NLS) \
+ --with-builtin-arc4random \
+ --with-privsep-user=ntp \
);
touch $(PKG_BUILD_DIR)/.configured
-$(PKG_BUILD_DIR)/ntpd: $(PKG_BUILD_DIR)/.configured
+$(PKG_BUILD_DIR)/.built:
$(MAKE) -C $(PKG_BUILD_DIR)
+ touch $(PKG_BUILD_DIR)/.built
-$(PKG_IPK): $(PKG_BUILD_DIR)/ntpd
- mkdir -p $(PKG_IPK_DIR)/usr/sbin
- cp -a ./ipkg/* $(PKG_IPK_DIR)/
- $(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
- cp $(PKG_BUILD_DIR)/ntpd $(PKG_IPK_DIR)/usr/sbin/
- $(STRIP) $(PKG_IPK_DIR)/usr/sbin/*
- mkdir -p $(PACKAGE_DIR)
- find $(PKG_IPK_DIR) -name CVS | xargs rm -rf
- $(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
-
-$(IPKG_STATE_DIR)/info/$(PKG_NAME).list: $(PKG_IPK)
- $(IPKG) install $(PKG_IPK)
-
-source: $(DL_DIR)/$(PKG_SOURCE)
-prepare: $(PKG_BUILD_DIR)/.unpacked
-compile: $(PKG_IPK)
-install: $(IPKG_STATE_DIR)/info/$(PKG_NAME).list
+$(IPKG_OPENNTPD):
+ install -d -m0755 $(IDIR_OPENNTPD)/etc
+ install -m0644 ./files/ntpd.conf $(IDIR_OPENNTPD)/etc/
+ install -d -m0755 $(IDIR_OPENNTPD)/etc/init.d
+ install -m0755 ./files/ntpd.init $(IDIR_OPENNTPD)/etc/init.d/S55ntpd
+ install -d -m0755 $(IDIR_OPENNTPD)/usr/sbin/
+ install -m0755 $(PKG_BUILD_DIR)/ntpd $(IDIR_OPENNTPD)/usr/sbin/
+ $(RSTRIP) $(IDIR_OPENNTPD)
+ $(IPKG_BUILD) $(IDIR_OPENNTPD) $(PACKAGE_DIR)
-clean:
- rm -rf $(PKG_BUILD_DIR)
- rm -f $(PKG_IPK)