* [Buildroot] [PATCH 0/6] Convert all remaining handwritten packages to gentarget infrastructure
@ 2012-09-21 22:28 Samuel Martin
2012-09-21 22:28 ` [Buildroot] [PATCH 1/6] netkitbase: convert to the generic-package infrastructure Samuel Martin
` (5 more replies)
0 siblings, 6 replies; 13+ messages in thread
From: Samuel Martin @ 2012-09-21 22:28 UTC (permalink / raw)
To: buildroot
Hi folks,
Since gettext now uses the autotools infrastructure, let's convert all remaining
packages using handwritten makefile to gentarget.
This patch series first rebases 2 patches sent in August by Thomas Petazzoni [1,2]
(and patchwork links: [3,4]), then convert the reaming packages and remove the
"Manual Makefile" section from the documentation.
Note:
This patch series only takes care of the *.mk files; it does not mark any packages
touched by this conversion as deprecated, unlike the RFC sent by Thomas Petazzoni [5].
Yours,
[1] http://lists.busybox.net/pipermail/buildroot/2012-August/057236.html
[2] http://lists.busybox.net/pipermail/buildroot/2012-August/057238.html
[3] http://patchwork.ozlabs.org/patch/176703/
[4] http://patchwork.ozlabs.org/patch/176705/
[5] http://lists.busybox.net/pipermail/buildroot/2012-August/057230.html
Samuel Martin (6):
netkitbase: convert to the generic-package infrastructure
netkittelnet: convert to generic-package infrastructure
ttcp: convert to generic-package infrastructure
newt: convert to generic-package infrastructure
vpnc: convert to generic-package infrastructure
manual: remove Manual Makefile section
docs/manual/adding-packages-handwritten.txt | 167 ----------------------------
docs/manual/adding-packages.txt | 2 -
package/netkitbase/netkitbase.mk | 79 ++++---------
package/netkittelnet/netkittelnet.mk | 81 ++++----------
package/netkittelnet/netkittelnet.patch | 2 +-
package/newt/newt.mk | 124 ++++++++-------------
package/ttcp/ttcp.mk | 56 +++-------
package/vpnc/vpnc-0.5.3-fix-build.patch | 71 ++++++++++++
package/vpnc/vpnc.mk | 83 ++++----------
9 files changed, 204 insertions(+), 461 deletions(-)
delete mode 100644 docs/manual/adding-packages-handwritten.txt
create mode 100644 package/vpnc/vpnc-0.5.3-fix-build.patch
--
1.7.12.1
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 1/6] netkitbase: convert to the generic-package infrastructure
2012-09-21 22:28 [Buildroot] [PATCH 0/6] Convert all remaining handwritten packages to gentarget infrastructure Samuel Martin
@ 2012-09-21 22:28 ` Samuel Martin
2012-10-09 7:39 ` Peter Korsgaard
2012-09-21 22:28 ` [Buildroot] [PATCH 2/6] netkittelnet: convert to " Samuel Martin
` (4 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Samuel Martin @ 2012-09-21 22:28 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Acked-by: Samuel Martin <s.martin49@gmail.com>
diff --git a/package/netkitbase/netkitbase.mk b/package/netkitbase/netkitbase.mk
index 56480fc..3899b78 100644
--- a/package/netkitbase/netkitbase.mk
+++ b/package/netkitbase/netkitbase.mk
@@ -3,69 +3,32 @@
# netkitbase
#
#############################################################
-NETKITBASE_VERSION:=0.17
-NETKITBASE_SOURCE:=netkit-base-$(NETKITBASE_VERSION).tar.gz
-NETKITBASE_SITE:=ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/
-NETKITBASE_DIR:=$(BUILD_DIR)/netkit-base-$(NETKITBASE_VERSION)
-NETKITBASE_CAT:=$(ZCAT)
-NETKITBASE_BINARY:=inetd/inetd
-NETKITBASE_TARGET_BINARY:=usr/sbin/inetd
+NETKITBASE_VERSION = 0.17
+NETKITBASE_SOURCE = netkit-base-$(NETKITBASE_VERSION).tar.gz
+NETKITBASE_SITE = ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/
+NETKITBASE_LICENSE = BSD-4c
-$(DL_DIR)/$(NETKITBASE_SOURCE):
- $(call DOWNLOAD,$(NETKITBASE_SITE)/$(NETKITBASE_SOURCE))
-
-netkitbase-source: $(DL_DIR)/$(NETKITBASE_SOURCE)
-
-$(NETKITBASE_DIR)/.unpacked: $(DL_DIR)/$(NETKITBASE_SOURCE)
- $(NETKITBASE_CAT) $(DL_DIR)/$(NETKITBASE_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+define NETKITBASE_CONFIGURE_CMDS
# use ANSI syntax
$(SED) "s/main()/main(void)/;" $(NETKITBASE_DIR)/configure
# don't try to run cross compiled binaries while configuring things
$(SED) "s~./__conftest~#./__conftest~;" $(NETKITBASE_DIR)/configure
- support/scripts/apply-patches.sh $(NETKITBASE_DIR) package/netkitbase/ netkitbase\*.patch
- touch $(NETKITBASE_DIR)/.unpacked
-
-$(NETKITBASE_DIR)/.configured: $(NETKITBASE_DIR)/.unpacked
- (cd $(NETKITBASE_DIR); rm -f config.cache; \
- PATH=$(TARGET_PATH) CC="$(TARGET_CC)" \
- ./configure --installroot=$(TARGET_DIR) --with-c-compiler="$(TARGET_CC)" \
- )
- touch $(NETKITBASE_DIR)/.configured
-
-$(NETKITBASE_DIR)/$(NETKITBASE_BINARY): $(NETKITBASE_DIR)/.configured
- $(MAKE) CC="$(TARGET_CC)" -C $(NETKITBASE_DIR)
- $(STRIPCMD) $(NETKITBASE_DIR)/$(NETKITBASE_BINARY)
-
-$(TARGET_DIR)/$(NETKITBASE_TARGET_BINARY): $(NETKITBASE_DIR)/$(NETKITBASE_BINARY)
- # Only install a few selected items...
- mkdir -p $(TARGET_DIR)/usr/sbin
- cp $(NETKITBASE_DIR)/$(NETKITBASE_BINARY) $(TARGET_DIR)/$(NETKITBASE_TARGET_BINARY)
- @if [ ! -f $(TARGET_DIR)/etc/inetd.conf ]; then \
- mkdir -p $(TARGET_DIR)/etc; \
- cp $(NETKITBASE_DIR)/etc.sample/inetd.conf $(TARGET_DIR)/etc/; \
+ (cd $(@D); \
+ $(TARGET_CONFIGURE_OPTS) \
+ ./configure \
+ --installroot=$(TARGET_DIR))
+endef
+
+define NETKITBASE_BUILD_CMDS
+ $(MAKE) -C $(@D)
+endef
+
+define NETKITBASE_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 0755 $(@D)/inetd/inetd $(TARGET_DIR)/usr/sbin/inetd
+ if [ ! -f $(TARGET_DIR)/etc/inetd.conf ]; then \
+ $(INSTALL) -D -m 0644 $(@D)/etc.sample/inetd.conf $(TARGET_DIR)/etc/inetd.conf; \
$(SED) "s/^\([a-z]\)/#\1/;" $(TARGET_DIR)/etc/inetd.conf; \
fi
- touch -c $(TARGET_DIR)/$(NETKITBASE_TARGET_BINARY)
-
-netkitbase-legal-info:
- @$(call legal-warning-pkg,netkitbase,legal-info not yet implemented)
-
-netkitbase: $(TARGET_DIR)/$(NETKITBASE_TARGET_BINARY)
+endef
-netkitbase-clean:
- #$(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(NETKITBASE_DIR) uninstall
- -rm -f $(TARGET_DIR)/usr/sbin/inetd $(TARGET_DIR)/etc/inetd.conf
- -rm -f $(TARGET_DIR)/etc/inetd.conf
- -$(MAKE) -C $(NETKITBASE_DIR) clean
-
-netkitbase-dirclean:
- rm -rf $(NETKITBASE_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_NETKITBASE),y)
-TARGETS+=netkitbase
-endif
+$(eval $(generic-package))
--
1.7.12.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 2/6] netkittelnet: convert to generic-package infrastructure
2012-09-21 22:28 [Buildroot] [PATCH 0/6] Convert all remaining handwritten packages to gentarget infrastructure Samuel Martin
2012-09-21 22:28 ` [Buildroot] [PATCH 1/6] netkitbase: convert to the generic-package infrastructure Samuel Martin
@ 2012-09-21 22:28 ` Samuel Martin
2012-10-09 7:40 ` Peter Korsgaard
2012-09-21 22:28 ` [Buildroot] [PATCH 3/6] ttcp: " Samuel Martin
` (3 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Samuel Martin @ 2012-09-21 22:28 UTC (permalink / raw)
To: buildroot
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
diff --git a/package/netkittelnet/netkittelnet.mk b/package/netkittelnet/netkittelnet.mk
index 43ba324..003094b 100644
--- a/package/netkittelnet/netkittelnet.mk
+++ b/package/netkittelnet/netkittelnet.mk
@@ -3,69 +3,30 @@
# netkittelnet
#
#############################################################
-NETKITTELNET_VERSION:=0.17
-NETKITTELNET_SOURCE:=netkit-telnet-$(NETKITTELNET_VERSION).tar.gz
-NETKITTELNET_SITE:=ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/
-NETKITTELNET_DIR:=$(BUILD_DIR)/netkit-telnet-$(NETKITTELNET_VERSION)
-NETKITTELNET_CAT:=$(ZCAT)
-NETKITTELNET_BINARY:=telnetd/telnetd
-NETKITTELNET_TARGET_BINARY:=usr/sbin/telnetd
+NETKITTELNET_VERSION = 0.17
+NETKITTELNET_SOURCE = netkit-telnet-$(NETKITTELNET_VERSION).tar.gz
+NETKITTELNET_SITE = ftp://ftp.uk.linux.org/pub/linux/Networking/netkit/
+NETKITTELNET_LICENSE = BSD-4c
-$(DL_DIR)/$(NETKITTELNET_SOURCE):
- $(call DOWNLOAD,$(NETKITTELNET_SITE)/$(NETKITTELNET_SOURCE))
-
-netkittelnet-source: $(DL_DIR)/$(NETKITTELNET_SOURCE)
-
-$(NETKITTELNET_DIR)/.unpacked: $(DL_DIR)/$(NETKITTELNET_SOURCE)
- $(NETKITTELNET_CAT) $(DL_DIR)/$(NETKITTELNET_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
+define NETKITTELNET_CONFIGURE_CMDS
# use ANSI syntax
- $(SED) "s/main()/main(void)/;" $(NETKITTELNET_DIR)/configure
+ $(SED) "s/main()/main(void)/;" $(@D)/configure
# Disable termcap support
- $(SED) "s~\(.*termcap\.h.*\)~/* \1 */~;" $(NETKITTELNET_DIR)/telnetd/telnetd.c
- # don't try to run cross compiled binaries while configuring things
- support/scripts/apply-patches.sh $(NETKITTELNET_DIR) package/netkittelnet/ netkittelnet\*.patch
- touch $(NETKITTELNET_DIR)/.unpacked
-
-$(NETKITTELNET_DIR)/.configured: $(NETKITTELNET_DIR)/.unpacked
- (cd $(NETKITTELNET_DIR); rm -f config.cache; \
- PATH=$(TARGET_PATH) CC="$(TARGET_CC)" \
- ./configure --installroot=$(TARGET_DIR) --with-c-compiler="$(TARGET_CC)" \
- )
- touch $(NETKITTELNET_DIR)/.configured
-
-$(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY): $(NETKITTELNET_DIR)/.configured
- $(MAKE) SUB=telnetd CC="$(TARGET_CC)" -C $(NETKITTELNET_DIR)
- $(STRIPCMD) $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY)
-
-$(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY): $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY)
- # Only install a few selected items...
- mkdir -p $(TARGET_DIR)/usr/sbin
- rm -f $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY)
- cp $(NETKITTELNET_DIR)/$(NETKITTELNET_BINARY) $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY)
+ $(SED) "s~\(.*termcap\.h.*\)~/* \1 */~;" $(@D)/telnetd/telnetd.c
+ (cd $(@D); \
+ $(TARGET_CONFIGURE_OPTS) \
+ ./configure \
+ --installroot=$(TARGET_DIR))
+endef
+
+define NETKITTELNET_BUILD_CMDS
+ $(MAKE) SUB=telnetd -C $(@D)
+endef
+
+define NETKITTELNET_INSTALL_TARGET_CMDS
+ $(INSTALL) -D -m 0755 $(@D)/telnetd/telnetd $(TARGET_DIR)/usr/sbin/telnetd
# Enable telnet in inetd
$(SED) "s~^#telnet.*~telnet\tstream\ttcp\tnowait\troot\t/usr/sbin/telnetd\t/usr/sbin/telnetd~;" $(TARGET_DIR)/etc/inetd.conf
- #$(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(NETKITTELNET_DIR) install
- #rm -rf $(TARGET_DIR)/share/locale $(TARGET_DIR)/usr/info \
- # $(TARGET_DIR)/usr/man $(TARGET_DIR)/usr/share/doc
-
-netkittelnet-legal-info:
- @$(call legal-warning-pkg,netkittelnet,legal-info not yet implemented)
-
-netkittelnet: netkitbase $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY)
+endef
-netkittelnet-clean:
- #$(MAKE) DESTDIR=$(TARGET_DIR) CC="$(TARGET_CC)" -C $(NETKITTELNET_DIR) uninstall
- -rm -f $(TARGET_DIR)/usr/sbin/telnetd
- -$(MAKE) -C $(NETKITTELNET_DIR) clean
-
-netkittelnet-dirclean:
- rm -rf $(NETKITTELNET_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_NETKITTELNET),y)
-TARGETS+=netkittelnet
-endif
+$(eval $(generic-package))
diff --git a/package/netkittelnet/netkittelnet.patch b/package/netkittelnet/netkittelnet.patch
index c894c2a..863bbcd 100644
--- a/package/netkittelnet/netkittelnet.patch
+++ b/package/netkittelnet/netkittelnet.patch
@@ -66,7 +66,7 @@
-cat <<EOF >__conftest.cc
-#include <stdio.h>
-#include <termcap.h>
--int main(void) {
+-int main() {
- tgetent(NULL, NULL); return 0;
-}
-
--
1.7.12.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 3/6] ttcp: convert to generic-package infrastructure
2012-09-21 22:28 [Buildroot] [PATCH 0/6] Convert all remaining handwritten packages to gentarget infrastructure Samuel Martin
2012-09-21 22:28 ` [Buildroot] [PATCH 1/6] netkitbase: convert to the generic-package infrastructure Samuel Martin
2012-09-21 22:28 ` [Buildroot] [PATCH 2/6] netkittelnet: convert to " Samuel Martin
@ 2012-09-21 22:28 ` Samuel Martin
2012-10-08 21:09 ` Peter Korsgaard
2012-09-21 22:28 ` [Buildroot] [PATCH 4/6] newt: " Samuel Martin
` (2 subsequent siblings)
5 siblings, 1 reply; 13+ messages in thread
From: Samuel Martin @ 2012-09-21 22:28 UTC (permalink / raw)
To: buildroot
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
diff --git a/package/ttcp/ttcp.mk b/package/ttcp/ttcp.mk
index 080286b..894b0cb 100644
--- a/package/ttcp/ttcp.mk
+++ b/package/ttcp/ttcp.mk
@@ -4,47 +4,25 @@
#
#############################################################
#
-TTCP_VERSION:=
-TTCP_SOURCE_URL=http://ftp.sunet.se/pub/network/monitoring/ttcp
-TTCP_SOURCE=ttcp$(TTCP_VERSION).c
-TTCP_DIR=$(BUILD_DIR)/ttcp$(TTCP_VERSION)
+TTCP_VERSION =
+TTCP_SITE = http://ftp.sunet.se/pub/network/monitoring/ttcp
+TTCP_SOURCE = ttcp.c
+TTCP_LICENSE = public domain
-$(DL_DIR)/$(TTCP_SOURCE):
- $(call DOWNLOAD,$(TTCP_SOURCE_URL)/$(TTCP_SOURCE))
+TTCP_BINARY = ttcp
-$(TTCP_DIR)/.unpacked: $(DL_DIR)/$(TTCP_SOURCE)
- -mkdir $(TTCP_DIR)
- cp -af $(DL_DIR)/$(TTCP_SOURCE) $(TTCP_DIR)
- support/scripts/apply-patches.sh $(TTCP_DIR) package/ttcp/ ttcp-\*.patch
- touch $(TTCP_DIR)/.unpacked
+define TTCP_EXTRACT_CMDS
+ cp -f -t $(@D) $(DL_DIR)/$(TTCP_SOURCE)
+endef
-$(TTCP_DIR)/.configured: $(TTCP_DIR)/.unpacked
- touch $(TTCP_DIR)/.configured
+define TTCP_BUILD_CMDS
+ $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) \
+ -o $(TTCP_SRCDIR)/$(TTCP_BINARY) $(@D)/$(TTCP_SOURCE)
+endef
-$(TTCP_DIR)/ttcp: $(TTCP_DIR)/.configured
- $(TARGET_CC) -O2 -o $(TTCP_DIR)/ttcp $(TTCP_DIR)/$(TTCP_SOURCE)
+define TTCP_INSTALL_TARGET_CMDS
+ $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(@D)/$(TTCP_BINARY)
+ $(INSTALL) -D -m 0755 $(@D)/$(TTCP_BINARY) $(TARGET_DIR)/usr/bin
+endef
-$(TARGET_DIR)/usr/bin/ttcp: $(TTCP_DIR)/ttcp
- cp -af $(TTCP_DIR)/ttcp $(TARGET_DIR)/usr/bin/
-
-ttcp-legal-info:
- @$(call legal-warning-pkg,ttcp,legal-info not yet implemented)
-
-ttcp: $(TARGET_DIR)/usr/bin/ttcp
-
-ttcp-source: $(DL_DIR)/$(TTCP_SOURCE)
-
-ttcp-clean:
- rm -f $(TTCP_DIR)/*.o $(TTCP_DIR)/ttcp
-
-ttcp-dirclean:
- rm -rf $(TTCP_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_TTCP),y)
-TARGETS+=ttcp
-endif
+$(eval $(generic-package))
--
1.7.12.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 4/6] newt: convert to generic-package infrastructure
2012-09-21 22:28 [Buildroot] [PATCH 0/6] Convert all remaining handwritten packages to gentarget infrastructure Samuel Martin
` (2 preceding siblings ...)
2012-09-21 22:28 ` [Buildroot] [PATCH 3/6] ttcp: " Samuel Martin
@ 2012-09-21 22:28 ` Samuel Martin
2012-10-08 21:05 ` Peter Korsgaard
2012-09-21 22:28 ` [Buildroot] [PATCH 5/6] vpnc: " Samuel Martin
2012-09-21 22:28 ` [Buildroot] [PATCH 6/6] manual: remove Manual Makefile section Samuel Martin
5 siblings, 1 reply; 13+ messages in thread
From: Samuel Martin @ 2012-09-21 22:28 UTC (permalink / raw)
To: buildroot
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
diff --git a/package/newt/newt.mk b/package/newt/newt.mk
index b10e4f8..9ec917c 100644
--- a/package/newt/newt.mk
+++ b/package/newt/newt.mk
@@ -3,80 +3,54 @@
# newt
#
#############################################################
-NEWT_SOURCE=newt-0.51.0.tar.bz2
-NEWT_CAT:=$(BZCAT)
-NEWT_SITE=http://www.uclibc.org/
-NEWT_DIR=$(BUILD_DIR)/newt-0.51.0
-NEWT_VERSION=0.51.0
-NEWT_CFLAGS=-Os -g -fPIC
-
-$(DL_DIR)/$(NEWT_SOURCE):
- $(call DOWNLOAD,$(NEWT_SITE)/$(NEWT_SOURCE))
-
-$(NEWT_DIR)/.source: $(DL_DIR)/$(NEWT_SOURCE)
- $(NEWT_CAT) $(DL_DIR)/$(NEWT_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- touch $(NEWT_DIR)/.source
-
-$(NEWT_DIR)/.configured: $(NEWT_DIR)/.source
- (cd $(NEWT_DIR); rm -rf config.cache; \
- $(TARGET_CONFIGURE_OPTS) \
- $(TARGET_CONFIGURE_ARGS) \
- CFLAGS="$(TARGET_CFLAGS) $(NEWT_CFLAGS)" \
- ./configure $(QUIET) \
- --target=$(GNU_TARGET_NAME) \
- --host=$(GNU_TARGET_NAME) \
- --build=$(GNU_HOST_NAME) \
- --prefix=/usr \
- --exec-prefix=/usr \
- --bindir=/usr/bin \
- --sbindir=/usr/sbin \
- --libdir=/lib \
- --libexecdir=/usr/lib \
- --sysconfdir=/etc \
- --datadir=/usr/share \
- --localstatedir=/var \
- --mandir=/usr/man \
- --infodir=/usr/info \
- $(DISABLE_NLS) \
- )
- touch $(NEWT_DIR)/.configured
-
-$(NEWT_DIR)/libnewt.so.$(NEWT_VERSION): $(NEWT_DIR)/.configured
- $(MAKE1) CFLAGS="$(TARGET_CFLAGS) $(NEWT_CFLAGS)" CC="$(TARGET_CC)" -C $(NEWT_DIR)
- touch -c $@
-
-$(STAGING_DIR)/usr/lib/libnewt.a: $(NEWT_DIR)/libnewt.so.$(NEWT_VERSION)
- cp -a $(NEWT_DIR)/libnewt.a $(STAGING_DIR)/usr/lib/
- cp -a $(NEWT_DIR)/newt.h $(STAGING_DIR)/usr/include/
- cp -a $(NEWT_DIR)/libnewt.so* $(STAGING_DIR)/usr/lib/
- (cd $(STAGING_DIR)/usr/lib; ln -fs libnewt.so.$(NEWT_VERSION) libnewt.so)
- (cd $(STAGING_DIR)/usr/lib; ln -fs libnewt.so.$(NEWT_VERSION) libnewt.so.0.51)
- touch -c $@
-
-$(TARGET_DIR)/usr/lib/libnewt.so.$(NEWT_VERSION): $(STAGING_DIR)/usr/lib/libnewt.a
+NEWT_VERSION = 0.51.0
+NEWT_SITE = http://www.uclibc.org/
+NEWT_SOURCE = newt-$(NEWT_VERSION).tar.bz2
+NEWT_LICENSE = GPLv2
+NEWT_LICENSE_FILES = COPYING
+NEWT_INSTALL_STAGING = YES
+
+NEWT_DEPENDENCIES = slang
+
+NEWT_CONFIGURE_ENV = \
+ $(TARGET_CONFIGURE_OPTS) \
+ $(TARGET_CONFIGURE_ARGS) \
+ CFLAGS="$(TARGET_CFLAGS)"
+
+NEWT_CONFIGURE_OPT = \
+ --prefix=/usr \
+ --exec-prefix=/usr \
+ --bindir=/usr/bin \
+ --sbindir=/usr/sbin \
+ --libdir=/lib \
+ --libexecdir=/usr/lib \
+ --sysconfdir=/etc \
+ --datadir=/usr/share \
+ --localstatedir=/var \
+ --mandir=/usr/man \
+ --infodir=/usr/info \
+ $(DISABLE_NLS)
+
+define NEWT_CONFIGURE_CMDS
+ ( cd $(@D) ; $(NEWT_CONFIGURE_ENV) ./configure $(NEWT_CONFIGURE_OPT) )
+endef
+
+define NEWT_BUILD_CMDS
+ $(MAKE1) CFLAGS="$(TARGET_CFLAGS)" CC="$(TARGET_CC)" -C $(@D)
+endef
+
+define NEWT_INSTALL_STAGING_CMDS
+ $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(@D)/libnewt.so.$(NEWT_VERSION)
+ $(INSTALL) -D -m644 $(@D)/newt.h $(STAGING_DIR)/usr/include/
+ $(INSTALL) -D -m644 $(@D)/libnewt.a $(STAGING_DIR)/usr/lib/
+ $(INSTALL) -D -m755 $(@D)/libnewt.so* $(STAGING_DIR)/usr/lib/
+ ln -fs libnewt.so.$(NEWT_VERSION) $(STAGING_DIR)/usr/lib/libnewt.so
+ ln -fs libnewt.so.$(NEWT_VERSION) $(STAGING_DIR)/usr/lib/libnewt.so.0.51
+endef
+
+define NEWT_INSTALL_TARGET_CMDS
+ $(INSTALL) -d $(TARGET_DIR)/usr/include/
cp -a $(STAGING_DIR)/usr/lib/libnewt.so* $(TARGET_DIR)/usr/lib/
- -$(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(TARGET_DIR)/usr/lib/libnewt.so*
- touch -c $@
-
-newt-legal-info:
- @$(call legal-warning-pkg,newt,legal-info not yet implemented)
-
-newt: slang $(TARGET_DIR)/usr/lib/libnewt.so.$(NEWT_VERSION)
+endef
-newt-source: $(DL_DIR)/$(NEWT_SOURCE)
-
-newt-clean:
- rm -f $(TARGET_DIR)/usr/lib/libnewt.so*
- -$(MAKE) -C $(NEWT_DIR) clean
-
-newt-dirclean: slang-dirclean
- rm -rf $(NEWT_DIR)
-
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_NEWT),y)
-TARGETS+=newt
-endif
+$(eval $(generic-package))
--
1.7.12.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 5/6] vpnc: convert to generic-package infrastructure
2012-09-21 22:28 [Buildroot] [PATCH 0/6] Convert all remaining handwritten packages to gentarget infrastructure Samuel Martin
` (3 preceding siblings ...)
2012-09-21 22:28 ` [Buildroot] [PATCH 4/6] newt: " Samuel Martin
@ 2012-09-21 22:28 ` Samuel Martin
2012-10-08 21:14 ` Peter Korsgaard
2012-09-21 22:28 ` [Buildroot] [PATCH 6/6] manual: remove Manual Makefile section Samuel Martin
5 siblings, 1 reply; 13+ messages in thread
From: Samuel Martin @ 2012-09-21 22:28 UTC (permalink / raw)
To: buildroot
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
create mode 100644 package/vpnc/vpnc-0.5.3-fix-build.patch
diff --git a/package/vpnc/vpnc-0.5.3-fix-build.patch b/package/vpnc/vpnc-0.5.3-fix-build.patch
new file mode 100644
index 0000000..e21348b
--- /dev/null
+++ b/package/vpnc/vpnc-0.5.3-fix-build.patch
@@ -0,0 +1,71 @@
+Misc. Makefile cleanup and fix the VERSION definition.
+
+Signed-off-by: Samuel Martin <s.martin49@gmail.com>
+
+---
+diff -purN vpnc-0.5.3.orig/Makefile vpnc-0.5.3/Makefile
+--- vpnc-0.5.3.orig/Makefile 2012-08-06 00:03:22.677914146 +0200
++++ vpnc-0.5.3/Makefile 2012-08-06 00:06:58.506744901 +0200
+@@ -19,21 +19,19 @@
+ #
+ # $Id: Makefile 312 2008-06-15 18:09:42Z Joerg Mayer $
+
+-DESTDIR=
+-PREFIX=/usr/local
+-ETCDIR=/etc/vpnc
+-BINDIR=$(PREFIX)/bin
+-SBINDIR=$(PREFIX)/sbin
+-MANDIR=$(PREFIX)/share/man
+-DOCDIR=$(PREFIX)/share/doc/vpnc
+-
+-SRCS = sysdep.c vpnc-debug.c isakmp-pkt.c tunip.c config.c dh.c math_group.c supp.c decrypt-utils.c
+-BINS = vpnc cisco-decrypt
+-OBJS = $(addsuffix .o,$(basename $(SRCS)))
++DESTDIR =
++PREFIX ?= /usr/local
++ETCDIR = /etc/vpnc
++BINDIR = $(PREFIX)/bin
++SBINDIR = $(PREFIX)/sbin
++MANDIR = $(PREFIX)/share/man
++DOCDIR = $(PREFIX)/share/doc/vpnc
++
++SRCS = sysdep.c vpnc-debug.c isakmp-pkt.c tunip.c config.c dh.c math_group.c supp.c decrypt-utils.c
++BINS = vpnc cisco-decrypt
++OBJS = $(addsuffix .o,$(basename $(SRCS)))
+ BINOBJS = $(addsuffix .o,$(BINS))
+ BINSRCS = $(addsuffix .c,$(BINS))
+-VERSION := $(shell sh mk-version)
+-RELEASE_VERSION := $(shell cat VERSION)
+
+ # The license of vpnc (Gpl >= 2) is quite likely incompatible with the
+ # openssl license. Openssl is currently used to provide certificate
+@@ -50,13 +48,13 @@ RELEASE_VERSION := $(shell cat VERSION)
+ #OPENSSL_GPL_VIOLATION = -DOPENSSL_GPL_VIOLATION
+ #OPENSSLLIBS = -lcrypto
+
+-CC=gcc
+-CFLAGS ?= -O3 -g
+-CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
+-CFLAGS += $(shell libgcrypt-config --cflags)
+-CPPFLAGS += -DVERSION=\"$(VERSION)\" $(OPENSSL_GPL_VIOLATION)
+-LDFLAGS ?= -g
+-LDFLAGS += $(shell libgcrypt-config --libs) $(OPENSSLLIBS)
++CC ?= gcc
++CFLAGS ?= -O3 -g
++CFLAGS += -W -Wall -Wmissing-declarations -Wwrite-strings
++CFLAGS += $(shell libgcrypt-config --cflags)
++CPPFLAGS += $(OPENSSL_GPL_VIOLATION)
++LDFLAGS ?= -g
++LDFLAGS += $(shell libgcrypt-config --libs) $(OPENSSLLIBS)
+
+ ifeq ($(shell uname -s), SunOS)
+ LDFLAGS += -lnsl -lresolv -lsocket
+@@ -84,7 +82,7 @@ cisco-decrypt : cisco-decrypt.o decrypt-
+ $(CC) -o $@ $^ $(LDFLAGS)
+
+ .depend: $(SRCS) $(BINSRCS)
+- $(CC) -MM $(SRCS) $(BINSRCS) $(CFLAGS) $(CPPFLAGS) > $@
++ $(CC) -MM $(SRCS) $(BINSRCS) $(CPPFLAGS) $(CFLAGS) > $@
+
+ vpnc-debug.c vpnc-debug.h : isakmp.h enum2debug.pl
+ LC_ALL=C perl -w ./enum2debug.pl isakmp.h >vpnc-debug.c 2>vpnc-debug.h
diff --git a/package/vpnc/vpnc.mk b/package/vpnc/vpnc.mk
index f585dc4..a17544e 100644
--- a/package/vpnc/vpnc.mk
+++ b/package/vpnc/vpnc.mk
@@ -4,62 +4,27 @@
#
#############################################################
-VPNC_VERSION=0.5.3
-VPNC_SOURCE=vpnc-$(VPNC_VERSION).tar.gz
-VPNC_SITE=http://www.unix-ag.uni-kl.de/~massar/vpnc
-VPNC_DIR=$(BUILD_DIR)/vpnc-$(VPNC_VERSION)
-VPNC_CAT:=$(ZCAT)
-VPNC_BINARY:=$(VPNC_DIR)/vpnc
-VPNC_DEST_DIR:=$(TARGET_DIR)/usr/local/sbin
-VPNC_TARGET_BINARY:=$(VPNC_DEST_DIR)/vpnc
-VPNC_TARGET_SCRIPT:=$(TARGET_DIR)/etc/vpnc/default.conf
-
-$(DL_DIR)/$(VPNC_SOURCE):
- $(call DOWNLOAD,$(VPNC_SITE)/$(VPNC_SOURCE))
-
-$(VPNC_DIR)/.unpacked: $(DL_DIR)/$(VPNC_SOURCE)
- $(VPNC_CAT) $(DL_DIR)/$(VPNC_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
- support/scripts/apply-patches.sh $(VPNC_DIR) package/vpnc vpnc-$(VPNC_VERSION)\*.patch
- touch $@
-
-$(VPNC_BINARY): $(VPNC_DIR)/.unpacked
- rm -f $@
- $(MAKE) $(TARGET_CONFIGURE_OPTS) INCLUDE=$(STAGING_DIR)/usr/include \
- CFLAGS="$(TARGET_CFLAGS)" \
- LDFLAGS+=-lgcrypt LDFLAGS+=-lgpg-error LDFLAGS+="$(TARGET_CFLAGS)" \
- CC="$(TARGET_CC)" -C $(VPNC_DIR)
-
-$(VPNC_TARGET_BINARY): $(VPNC_BINARY)
- $(MAKE) $(TARGET_CONFIGURE_OPTS) \
- DESTDIR=$(TARGET_DIR) \
- BINDIR=/usr/local/bin \
- SBINDIR=/usr/local/sbin \
- ETCDIR=/etc/vpnc \
- MANDIR=/usr/share/man \
- VERSION=$(VPNC_VERSION) \
- INCLUDE=$(STAGING_DIR)/usr/include \
- LDFLAGS="-lgcrypt -lgpg-error $(TARGET_CFLAGS)" \
- -C $(VPNC_DIR) install
- $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(VPNC_TARGET_BINARY)
-
-vpnc-legal-info:
- @$(call legal-warning-pkg,vpnc,legal-info not yet implemented)
-
-vpnc: libgcrypt $(VPNC_TARGET_BINARY)
-
-vpnc-source: $(DL_DIR)/$(VPNC_SOURCE)
-
-vpnc-clean:
- -$(MAKE) -C $(VPNC_DIR) clean
- rm -f $(STAGING_DIR)/usr/bin/vpnc
-
-vpnc-dirclean:
- rm -rf $(VPNC_DIR)
-#############################################################
-#
-# Toplevel Makefile options
-#
-#############################################################
-ifeq ($(BR2_PACKAGE_VPNC),y)
-TARGETS+=vpnc
-endif
+VPNC_VERSION = 0.5.3
+VPNC_SITE = http://www.unix-ag.uni-kl.de/~massar/vpnc
+VPNC_LICENSE = GPLv2+
+VPNC_LICENSE_FILES = COPYING
+
+VPNC_DEPENDENCIES = libgcrypt libgpg-error
+
+VPNC_LDFLAGS = $(TARGET_LDFLAGS) -lgcrypt -lgpg-error
+VPNC_CPPFLAGS = -DVERSION=\\\"$(VPNC_VERSION)\\\"
+
+define VPNC_BUILD_CMDS
+ $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CC="$(TARGET_CC)" \
+ CPPFLAGS="$(VPNC_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(VPNC_LDFLAGS)"
+endef
+
+define VPNC_INSTALL_TARGET_CMDS
+ $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(@D)/vpnc
+ $(MAKE) -C $(@D) install $(TARGET_CONFIGURE_OPTS) \
+ CPPFLAGS="$(VPNC_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" \
+ LDFLAGS="$(VPNC_LDFLAGS)" DESTDIR="$(TARGET_DIR)" PREFIX=/usr
+endef
+
+$(eval $(generic-package))
--
1.7.12.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 6/6] manual: remove Manual Makefile section
2012-09-21 22:28 [Buildroot] [PATCH 0/6] Convert all remaining handwritten packages to gentarget infrastructure Samuel Martin
` (4 preceding siblings ...)
2012-09-21 22:28 ` [Buildroot] [PATCH 5/6] vpnc: " Samuel Martin
@ 2012-09-21 22:28 ` Samuel Martin
2012-10-21 19:40 ` Peter Korsgaard
5 siblings, 1 reply; 13+ messages in thread
From: Samuel Martin @ 2012-09-21 22:28 UTC (permalink / raw)
To: buildroot
Signed-off-by: Samuel Martin <s.martin49@gmail.com>
delete mode 100644 docs/manual/adding-packages-handwritten.txt
diff --git a/docs/manual/adding-packages-handwritten.txt b/docs/manual/adding-packages-handwritten.txt
deleted file mode 100644
index beb25f6..0000000
--- a/docs/manual/adding-packages-handwritten.txt
+++ /dev/null
@@ -1,167 +0,0 @@
-[[handwritten-tutorial]]
-
-Manual Makefile
----------------
-
-*NOTE: new manual makefiles should not be created, and existing manual
-makefiles should be converted either to the generic, autotools or
-cmake infrastructure. This section is only kept to document the
-existing manual makefiles and to help understand how they work.*
-
-------------------------
-01: #############################################################
-02: #
-03: # libfoo
-04: #
-05: #############################################################
-06: LIBFOO_VERSION = 1.0
-07: LIBFOO_SOURCE = libfoo-$(LIBFOO_VERSION).tar.gz
-08: LIBFOO_SITE = http://www.foosoftware.org/downloads
-09: LIBFOO_DIR = $(BUILD_DIR)/foo-$(FOO_VERSION)
-10: LIBFOO_BINARY = foo
-11: LIBFOO_TARGET_BINARY = usr/bin/foo
-12:
-13: $(DL_DIR)/$(LIBFOO_SOURCE):
-14: $(call DOWNLOAD,$(LIBFOO_SITE)/$(LIBFOO_SOURCE))
-15:
-16: $(LIBFOO_DIR)/.source: $(DL_DIR)/$(LIBFOO_SOURCE)
-17: $(ZCAT) $(DL_DIR)/$(LIBFOO_SOURCE) | tar -C $(BUILD_DIR) $(TAR_OPTIONS) -
-18: touch $@
-19:
-20: $(LIBFOO_DIR)/.configured: $(LIBFOO_DIR)/.source
-21: (cd $(LIBFOO_DIR); rm -rf config.cache; \
-22: $(TARGET_CONFIGURE_OPTS) \
-23: $(TARGET_CONFIGURE_ARGS) \
-24: ./configure \
-25: --target=$(GNU_TARGET_NAME) \
-26: --host=$(GNU_TARGET_NAME) \
-27: --build=$(GNU_HOST_NAME) \
-28: --prefix=/usr \
-29: --sysconfdir=/etc \
-30: )
-31: touch $@
-32:
-33: $(LIBFOO_DIR)/$(LIBFOO_BINARY): $(LIBFOO_DIR)/.configured
-34: $(MAKE) CC=$(TARGET_CC) -C $(LIBFOO_DIR)
-35:
-36: $(TARGET_DIR)/$(LIBFOO_TARGET_BINARY): $(LIBFOO_DIR)/$(LIBFOO_BINARY)
-37: $(MAKE) DESTDIR=$(TARGET_DIR) -C $(LIBFOO_DIR) install-strip
-38: rm -Rf $(TARGET_DIR)/usr/man
-39:
-40: libfoo: uclibc ncurses $(TARGET_DIR)/$(LIBFOO_TARGET_BINARY)
-41:
-42: libfoo-source: $(DL_DIR)/$(LIBFOO_SOURCE)
-43:
-44: libfoo-clean:
-45: $(MAKE) prefix=$(TARGET_DIR)/usr -C $(LIBFOO_DIR) uninstall
-46: -$(MAKE) -C $(LIBFOO_DIR) clean
-47:
-48: libfoo-dirclean:
-49: rm -rf $(LIBFOO_DIR)
-50:
-51: #############################################################
-52: #
-53: # Toplevel Makefile options
-54: #
-55: #############################################################
-56: ifeq ($(BR2_PACKAGE_LIBFOO),y)
-57: TARGETS += libfoo
-58: endif
-------------------------
-
-First of all, this Makefile example works for a package which
-comprises a single binary executable. For other software, such as
-libraries or more complex stuff with multiple binaries, it must be
-qqadapted. For examples look at the other +*.mk+ files in the
-+package+ directory.
-
-At lines 6-11, a couple of useful variables are defined:
-
-* +LIBFOO_VERSION+: The version of 'libfoo' that should be downloaded.
-
-* +LIBFOO_SOURCE+: The name of the tarball of 'libfoo' on the download
- website or FTP site. As you can see +LIBFOO_VERSION+ is used.
-
-* +LIBFOO_SITE+: The HTTP or FTP site from which 'libfoo' archive is
- downloaded. It must include the complete path to the directory where
- +LIBFOO_SOURCE+ can be found.
-
-* +LIBFOO_DIR+: The directory into which the software will be
- configured and compiled. Basically, it's a subdirectory of
- +BUILD_DIR+ which is created upon decompression of the tarball.
-
-* +LIBFOO_BINARY+: Software binary name. As said previously, this is
- an example for a package with a single binary.
-
-* +LIBFOO_TARGET_BINARY+: The full path of the binary inside the
- target filesystem. Lines 13-14 define a target that downloads the
- tarball from the remote site to the download directory (+DL_DIR+).
-
-Lines 16-18 define a target and associated rules that uncompress the
-downloaded tarball. As you can see, this target depends on the tarball
-file so that the previous target (lines 13-14) is called before
-executing the rules of the current target. Uncompressing is followed
-by 'touching' a hidden file to mark the software as having been
-uncompressed. This trick is used everywhere in a Buildroot Makefile to
-split steps (download, uncompress, configure, compile, install) while
-still having correct dependencies.
-
-Lines 20-31 define a target and associated rules that configure the
-software. It depends on the previous target (the hidden +.source+
-file) so that we are sure the software has been uncompressed. In order
-to configure the package, it basically runs the well-known
-+./configure+ script. As we may be doing cross-compilation, +target+,
-+host+ and +build+ arguments are given. The prefix is also set to
-+/usr+, not because the software will be installed in +/usr+ on your
-host system, but because the software will be installed in + /usr+ on
-the target filesystem. Finally it creates a +.configured+ file to mark
-the software as configured.
-
-Lines 33-34 define a target and a rule that compile the software. This
-target will create the binary file in the compilation directory and
-depends on the software being already configured (hence the reference
-to the +.configured+ file). It basically runs +make+ inside the
-source directory.
-
-Lines 36-38 define a target and associated rules that install the
-software inside the target filesystem. They depend on the binary file
-in the source directory to make sure the software has been
-compiled. They use the +install-strip+ target of the software
-+Makefile+ by passing a +DESTDIR+ argument so that the +Makefile+
-doesn't try to install the software in the host +/usr+ but rather in
-the target +/usr+. After the installation, the +/usr/man + directory
-inside the target filesystem is removed to save space.
-
-Line 40 defines the main target of the software — the one that
-will eventually be used by the top level +Makefile+ to download,
-compile, and then install this package. This target should first of
-all depend on all needed dependencies of the software (in our example,
-'uclibc' and 'ncurses') and also depend on the final binary. This last
-dependency will call all previous dependencies in the correct order.
-
-Line 42 defines a simple target that only downloads the code
-source. This is not used during normal operation of Buildroot, but is
-needed if you intend to download all required sources at once for
-later offline build. Note that if you add a new package, providing a
-+libfoo-source+ target is 'mandatory' to support users that wish to do
-offline-builds. Furthermore, it eases checking if all package-sources
-are downloadable.
-
-Lines 44-46 define a simple target to clean the software build by
-calling the Makefile with the appropriate options. The +-clean+
-target should run +make clean+ on $(BUILD_DIR)/package-version and
-MUST uninstall all files of the package from $(STAGING_DIR) and from
-$(TARGET_DIR).
-
-Lines 48-49 define a simple target to completely remove the directory
-in which the software was uncompressed, configured and compiled. The
-+-dirclean+ target MUST completely rm $(BUILD_DIR)/ package-version.
-
-Lines 51-58 add the target +libfoo+ to the list of targets to be
-compiled by Buildroot, by first checking if the configuration option
-for this package has been enabled using the configuration tool. If so,
-it then "subscribes" this package to be compiled by adding
-the package to the TARGETS global variable. The name added to the
-TARGETS global variable is the name of this package's target, as
-defined on line 40, which is used by Buildroot to download, compile,
-and then install this package.
diff --git a/docs/manual/adding-packages.txt b/docs/manual/adding-packages.txt
index cb75f2d..f672ec6 100644
--- a/docs/manual/adding-packages.txt
+++ b/docs/manual/adding-packages.txt
@@ -15,8 +15,6 @@ include::adding-packages-autotools.txt[]
include::adding-packages-cmake.txt[]
-include::adding-packages-handwritten.txt[]
-
include::adding-packages-gettext.txt[]
include::adding-packages-conclusion.txt[]
--
1.7.12.1
^ permalink raw reply related [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 4/6] newt: convert to generic-package infrastructure
2012-09-21 22:28 ` [Buildroot] [PATCH 4/6] newt: " Samuel Martin
@ 2012-10-08 21:05 ` Peter Korsgaard
0 siblings, 0 replies; 13+ messages in thread
From: Peter Korsgaard @ 2012-10-08 21:05 UTC (permalink / raw)
To: buildroot
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
Samuel> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Why not autotools? From a quick look at it, it looks like std autotools
(but old).
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 3/6] ttcp: convert to generic-package infrastructure
2012-09-21 22:28 ` [Buildroot] [PATCH 3/6] ttcp: " Samuel Martin
@ 2012-10-08 21:09 ` Peter Korsgaard
0 siblings, 0 replies; 13+ messages in thread
From: Peter Korsgaard @ 2012-10-08 21:09 UTC (permalink / raw)
To: buildroot
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
Samuel> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Samuel> diff --git a/package/ttcp/ttcp.mk b/package/ttcp/ttcp.mk
Samuel> index 080286b..894b0cb 100644
Samuel> --- a/package/ttcp/ttcp.mk
Samuel> +++ b/package/ttcp/ttcp.mk
Samuel> @@ -4,47 +4,25 @@
Samuel> #
Samuel> #############################################################
Samuel> #
Samuel> -TTCP_VERSION:=
Samuel> -TTCP_SOURCE_URL=http://ftp.sunet.se/pub/network/monitoring/ttcp
Samuel> -TTCP_SOURCE=ttcp$(TTCP_VERSION).c
Samuel> -TTCP_DIR=$(BUILD_DIR)/ttcp$(TTCP_VERSION)
Samuel> +TTCP_VERSION =
Samuel> +TTCP_SITE = http://ftp.sunet.se/pub/network/monitoring/ttcp
Samuel> +TTCP_SOURCE = ttcp.c
Samuel> +TTCP_LICENSE = public domain
Samuel> -$(DL_DIR)/$(TTCP_SOURCE):
Samuel> - $(call DOWNLOAD,$(TTCP_SOURCE_URL)/$(TTCP_SOURCE))
Samuel> +TTCP_BINARY = ttcp
Samuel> -$(TTCP_DIR)/.unpacked: $(DL_DIR)/$(TTCP_SOURCE)
Samuel> - -mkdir $(TTCP_DIR)
Samuel> - cp -af $(DL_DIR)/$(TTCP_SOURCE) $(TTCP_DIR)
Samuel> - support/scripts/apply-patches.sh $(TTCP_DIR) package/ttcp/ ttcp-\*.patch
Samuel> - touch $(TTCP_DIR)/.unpacked
Samuel> +define TTCP_EXTRACT_CMDS
Samuel> + cp -f -t $(@D) $(DL_DIR)/$(TTCP_SOURCE)
Samuel> +endef
Samuel> -$(TTCP_DIR)/.configured: $(TTCP_DIR)/.unpacked
Samuel> - touch $(TTCP_DIR)/.configured
Samuel> +define TTCP_BUILD_CMDS
Samuel> + $(TARGET_CC) $(TARGET_CPPFLAGS) $(TARGET_CFLAGS) \
Samuel> + -o $(TTCP_SRCDIR)/$(TTCP_BINARY) $(@D)/$(TTCP_SOURCE)
I prefer to use $(@D) both places for consistency.
Samuel> +endef
Samuel> -$(TTCP_DIR)/ttcp: $(TTCP_DIR)/.configured
Samuel> - $(TARGET_CC) -O2 -o $(TTCP_DIR)/ttcp $(TTCP_DIR)/$(TTCP_SOURCE)
Samuel> +define TTCP_INSTALL_TARGET_CMDS
Samuel> + $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(@D)/$(TTCP_BINARY)
Samuel> + $(INSTALL) -D -m 0755 $(@D)/$(TTCP_BINARY) $(TARGET_DIR)/usr/bin
Samuel> +endef
You shouldn't do the explicit strip.
You have to provide the destination file name when using install -D.
Committed with those fixes, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 5/6] vpnc: convert to generic-package infrastructure
2012-09-21 22:28 ` [Buildroot] [PATCH 5/6] vpnc: " Samuel Martin
@ 2012-10-08 21:14 ` Peter Korsgaard
0 siblings, 0 replies; 13+ messages in thread
From: Peter Korsgaard @ 2012-10-08 21:14 UTC (permalink / raw)
To: buildroot
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
Samuel> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Samuel> create mode 100644 package/vpnc/vpnc-0.5.3-fix-build.patch
Samuel> +VPNC_VERSION = 0.5.3
Samuel> +VPNC_SITE = http://www.unix-ag.uni-kl.de/~massar/vpnc
Samuel> +VPNC_LICENSE = GPLv2+
Samuel> +VPNC_LICENSE_FILES = COPYING
Samuel> +
Samuel> +VPNC_DEPENDENCIES = libgcrypt libgpg-error
Samuel> +
Samuel> +VPNC_LDFLAGS = $(TARGET_LDFLAGS) -lgcrypt -lgpg-error
Samuel> +VPNC_CPPFLAGS = -DVERSION=\\\"$(VPNC_VERSION)\\\"
Samuel> +
Samuel> +define VPNC_BUILD_CMDS
Samuel> + $(MAKE) -C $(@D) $(TARGET_CONFIGURE_OPTS) CC="$(TARGET_CC)" \
Samuel> + CPPFLAGS="$(VPNC_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" \
Samuel> + LDFLAGS="$(VPNC_LDFLAGS)"
CC and CFLAGS are included in TARGET_CONFIGURE_OPTS, so those can be
dropped.
Samuel> +endef
Samuel> +
Samuel> +define VPNC_INSTALL_TARGET_CMDS
Samuel> + $(STRIPCMD) $(STRIP_STRIP_UNNEEDED) $(@D)/vpnc
Samuel> + $(MAKE) -C $(@D) install $(TARGET_CONFIGURE_OPTS) \
Samuel> + CPPFLAGS="$(VPNC_CPPFLAGS)" CFLAGS="$(TARGET_CFLAGS)" \
Samuel> + LDFLAGS="$(VPNC_LDFLAGS)" DESTDIR="$(TARGET_DIR)" PREFIX=/usr
Samuel> +endef
The explicit STRIPCMD shouldn't be used, and CFLAGS can again be
dropped.
Committed with those fixes, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 1/6] netkitbase: convert to the generic-package infrastructure
2012-09-21 22:28 ` [Buildroot] [PATCH 1/6] netkitbase: convert to the generic-package infrastructure Samuel Martin
@ 2012-10-09 7:39 ` Peter Korsgaard
0 siblings, 0 replies; 13+ messages in thread
From: Peter Korsgaard @ 2012-10-09 7:39 UTC (permalink / raw)
To: buildroot
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
Samuel> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Samuel> Acked-by: Samuel Martin <s.martin49@gmail.com>
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 2/6] netkittelnet: convert to generic-package infrastructure
2012-09-21 22:28 ` [Buildroot] [PATCH 2/6] netkittelnet: convert to " Samuel Martin
@ 2012-10-09 7:40 ` Peter Korsgaard
0 siblings, 0 replies; 13+ messages in thread
From: Peter Korsgaard @ 2012-10-09 7:40 UTC (permalink / raw)
To: buildroot
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
Samuel> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Samuel> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Y Samuel> -netkittelnet: netkitbase $(TARGET_DIR)/$(NETKITTELNET_TARGET_BINARY)
You forgot to add netkitbase to _DEPENDENCIES, but I fixed that and
committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 13+ messages in thread
* [Buildroot] [PATCH 6/6] manual: remove Manual Makefile section
2012-09-21 22:28 ` [Buildroot] [PATCH 6/6] manual: remove Manual Makefile section Samuel Martin
@ 2012-10-21 19:40 ` Peter Korsgaard
0 siblings, 0 replies; 13+ messages in thread
From: Peter Korsgaard @ 2012-10-21 19:40 UTC (permalink / raw)
To: buildroot
>>>>> "Samuel" == Samuel Martin <s.martin49@gmail.com> writes:
Samuel> Signed-off-by: Samuel Martin <s.martin49@gmail.com>
Samuel> delete mode 100644 docs/manual/adding-packages-handwritten.txt
Committed, thanks.
--
Bye, Peter Korsgaard
^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2012-10-21 19:40 UTC | newest]
Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-09-21 22:28 [Buildroot] [PATCH 0/6] Convert all remaining handwritten packages to gentarget infrastructure Samuel Martin
2012-09-21 22:28 ` [Buildroot] [PATCH 1/6] netkitbase: convert to the generic-package infrastructure Samuel Martin
2012-10-09 7:39 ` Peter Korsgaard
2012-09-21 22:28 ` [Buildroot] [PATCH 2/6] netkittelnet: convert to " Samuel Martin
2012-10-09 7:40 ` Peter Korsgaard
2012-09-21 22:28 ` [Buildroot] [PATCH 3/6] ttcp: " Samuel Martin
2012-10-08 21:09 ` Peter Korsgaard
2012-09-21 22:28 ` [Buildroot] [PATCH 4/6] newt: " Samuel Martin
2012-10-08 21:05 ` Peter Korsgaard
2012-09-21 22:28 ` [Buildroot] [PATCH 5/6] vpnc: " Samuel Martin
2012-10-08 21:14 ` Peter Korsgaard
2012-09-21 22:28 ` [Buildroot] [PATCH 6/6] manual: remove Manual Makefile section Samuel Martin
2012-10-21 19:40 ` Peter Korsgaard
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox