mirror of
git://projects.qi-hardware.com/openwrt-xburst.git
synced 2024-11-10 17:43:10 +02:00
Convert openntpd to new packaging style
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@937 3c298f89-4303-0410-b956-a3cf2f4a3e73
This commit is contained in:
parent
da6454c589
commit
b249e2425f
@ -1,6 +1,9 @@
|
|||||||
config BR2_PACKAGE_OPENNTPD
|
config BR2_PACKAGE_OPENNTPD
|
||||||
tristate "Openntpd"
|
tristate "openntpd - a FREE, easy to use implementation of NTP (Network Time Protocol)"
|
||||||
default m if CONFIG_DEVEL
|
default m if CONFIG_DEVEL
|
||||||
help
|
help
|
||||||
NTP server
|
NTP server
|
||||||
|
|
||||||
http://www.openntpd.org
|
http://www.openntpd.org
|
||||||
|
|
||||||
|
|
||||||
|
@ -11,62 +11,54 @@ PKG_MD5SUM:=4584f226523776a3cdd2fb6f8212ba8d
|
|||||||
PKG_SOURCE_URL:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/ \
|
PKG_SOURCE_URL:=ftp://ftp.openbsd.org/pub/OpenBSD/OpenNTPD/ \
|
||||||
ftp://ftp.de.openbsd.org/pub/unix/OpenBSD/OpenNTPD/
|
ftp://ftp.de.openbsd.org/pub/unix/OpenBSD/OpenNTPD/
|
||||||
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
|
||||||
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
|
||||||
PKG_CAT:=zcat
|
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):
|
PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)
|
||||||
$(SCRIPT_DIR)/download.pl $(DL_DIR) $(PKG_SOURCE) $(PKG_MD5SUM) $(PKG_SOURCE_URL)
|
|
||||||
|
|
||||||
$(PKG_BUILD_DIR)/.unpacked: $(DL_DIR)/$(PKG_SOURCE)
|
include $(TOPDIR)/package/rules.mk
|
||||||
$(PKG_CAT) $(DL_DIR)/$(PKG_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
|
|
||||||
touch $(PKG_BUILD_DIR)/.unpacked
|
|
||||||
|
|
||||||
$(PKG_BUILD_DIR)/.configured: $(PKG_BUILD_DIR)/.unpacked
|
$(eval $(call PKG_template,OPENNTPD,openntpd,$(PKG_VERSION)-$(PKG_RELEASE),$(ARCH)))
|
||||||
(cd $(PKG_BUILD_DIR); rm -rf config.cache; \
|
|
||||||
|
$(PKG_BUILD_DIR)/.configured:
|
||||||
|
(cd $(PKG_BUILD_DIR); rm -rf config.{cache,status} ; \
|
||||||
$(TARGET_CONFIGURE_OPTS) \
|
$(TARGET_CONFIGURE_OPTS) \
|
||||||
CFLAGS="$(TARGET_CFLAGS)" \
|
CFLAGS="$(TARGET_CFLAGS)" \
|
||||||
./configure \
|
./configure \
|
||||||
--target=$(GNU_TARGET_NAME) \
|
--target=$(GNU_TARGET_NAME) \
|
||||||
--host=$(GNU_TARGET_NAME) \
|
--host=$(GNU_TARGET_NAME) \
|
||||||
--build=$(GNU_HOST_NAME) \
|
--build=$(GNU_HOST_NAME) \
|
||||||
|
--program-prefix="" \
|
||||||
|
--program-suffix="" \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
--exec-prefix=/usr \
|
--exec-prefix=/usr \
|
||||||
--bindir=/usr/bin \
|
--bindir=/usr/bin \
|
||||||
--sbindir=/usr/sbin \
|
|
||||||
--libexecdir=/usr/lib \
|
|
||||||
--sysconfdir=/etc \
|
|
||||||
--datadir=/usr/share \
|
--datadir=/usr/share \
|
||||||
|
--includedir=/usr/include \
|
||||||
|
--infodir=/usr/share/info \
|
||||||
|
--libdir=/usr/lib \
|
||||||
|
--libexecdir=/usr/lib \
|
||||||
--localstatedir=/var \
|
--localstatedir=/var \
|
||||||
--mandir=/usr/man \
|
--mandir=/usr/share/man \
|
||||||
--infodir=/usr/info \
|
--sbindir=/usr/sbin \
|
||||||
|
--sysconfdir=/etc \
|
||||||
|
$(DISABLE_LARGEFILE) \
|
||||||
|
$(DISABLE_NLS) \
|
||||||
--with-builtin-arc4random \
|
--with-builtin-arc4random \
|
||||||
--with-privsep-user=ntp \
|
--with-privsep-user=ntp \
|
||||||
);
|
);
|
||||||
touch $(PKG_BUILD_DIR)/.configured
|
touch $(PKG_BUILD_DIR)/.configured
|
||||||
|
|
||||||
$(PKG_BUILD_DIR)/ntpd: $(PKG_BUILD_DIR)/.configured
|
$(PKG_BUILD_DIR)/.built:
|
||||||
$(MAKE) -C $(PKG_BUILD_DIR)
|
$(MAKE) -C $(PKG_BUILD_DIR)
|
||||||
|
touch $(PKG_BUILD_DIR)/.built
|
||||||
|
|
||||||
$(PKG_IPK): $(PKG_BUILD_DIR)/ntpd
|
$(IPKG_OPENNTPD):
|
||||||
mkdir -p $(PKG_IPK_DIR)/usr/sbin
|
install -d -m0755 $(IDIR_OPENNTPD)/etc
|
||||||
cp -a ./ipkg/* $(PKG_IPK_DIR)/
|
install -m0644 ./files/ntpd.conf $(IDIR_OPENNTPD)/etc/
|
||||||
$(SCRIPT_DIR)/make-ipkg-dir.sh $(PKG_IPK_DIR) $(PKG_NAME).control $(PKG_VERSION)-$(PKG_RELEASE) $(ARCH)
|
install -d -m0755 $(IDIR_OPENNTPD)/etc/init.d
|
||||||
cp $(PKG_BUILD_DIR)/ntpd $(PKG_IPK_DIR)/usr/sbin/
|
install -m0755 ./files/ntpd.init $(IDIR_OPENNTPD)/etc/init.d/S55ntpd
|
||||||
$(STRIP) $(PKG_IPK_DIR)/usr/sbin/*
|
install -d -m0755 $(IDIR_OPENNTPD)/usr/sbin/
|
||||||
mkdir -p $(PACKAGE_DIR)
|
install -m0755 $(PKG_BUILD_DIR)/ntpd $(IDIR_OPENNTPD)/usr/sbin/
|
||||||
find $(PKG_IPK_DIR) -name CVS | xargs rm -rf
|
$(RSTRIP) $(IDIR_OPENNTPD)
|
||||||
$(IPKG_BUILD) $(PKG_IPK_DIR) $(PACKAGE_DIR)
|
$(IPKG_BUILD) $(IDIR_OPENNTPD) $(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
|
|
||||||
|
|
||||||
clean:
|
|
||||||
rm -rf $(PKG_BUILD_DIR)
|
|
||||||
rm -f $(PKG_IPK)
|
|
||||||
|
0
openwrt/package/openntpd/files/S49ntpd → openwrt/package/openntpd/files/ntpd.init
Executable file → Normal file
0
openwrt/package/openntpd/files/S49ntpd → openwrt/package/openntpd/files/ntpd.init
Executable file → Normal file
@ -1,3 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
mkdir -p `grep "^ntp:" /etc/passwd | cut -d: -f6`
|
|
||||||
/usr/sbin/ntpd -s
|
|
4
openwrt/package/openntpd/ipkg/CONTROL/postinst → openwrt/package/openntpd/ipkg/openntpd.postinst
Executable file → Normal file
4
openwrt/package/openntpd/ipkg/CONTROL/postinst → openwrt/package/openntpd/ipkg/openntpd.postinst
Executable file → Normal file
@ -11,11 +11,11 @@ if [ -z "${IPKG_INSTROOT}" ]; then
|
|||||||
if [ "$rootfs" = "squashfs" ]; then
|
if [ "$rootfs" = "squashfs" ]; then
|
||||||
if [ -h /etc/group ]; then
|
if [ -h /etc/group ]; then
|
||||||
rm /etc/group
|
rm /etc/group
|
||||||
cp /rom/etc/group /etc/group
|
cp -p /rom/etc/group /etc/group
|
||||||
fi
|
fi
|
||||||
if [ -h /etc/passwd ]; then
|
if [ -h /etc/passwd ]; then
|
||||||
rm /etc/passwd
|
rm /etc/passwd
|
||||||
cp /rom/etc/passwd /etc/passwd
|
cp -p /rom/etc/passwd /etc/passwd
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
||||||
fi
|
fi
|
Loading…
Reference in New Issue
Block a user