summaryrefslogtreecommitdiff
path: root/package/libnet/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'package/libnet/Makefile')
-rw-r--r--package/libnet/Makefile20
1 files changed, 16 insertions, 4 deletions
diff --git a/package/libnet/Makefile b/package/libnet/Makefile
index 04adb4836..7023e0b40 100644
--- a/package/libnet/Makefile
+++ b/package/libnet/Makefile
@@ -15,8 +15,15 @@ PKG_URL:= http://sourceforge.net/projects/libnet-dev/
PKG_SITES:= ${MASTER_SITE_SOURCEFORGE:=libnet-dev/}
PKG_NEED_CXX:= 1
+PKG_SUBPKGS:= LIBNET LIBNET_DEV
+PKGSC_LIBNET_DEV:= devel
+PKGSD_LIBNET_DEV:= libnet headers
+
include ${TOPDIR}/mk/package.mk
+$(eval $(call PKG_template,LIBNET,libnet,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
+$(eval $(call PKG_template,LIBNET_DEV,libnet-dev,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKGSD_LIBNET_DEV},${PKGSC_LIBNET_DEV}))
+
ENDIAN:=lil
ifeq (${CPU_ARCH},mips)
ENDIAN:=big
@@ -28,13 +35,18 @@ ifeq (${CPU_ARCH},ppc)
ENDIAN:=big
endif
-$(eval $(call PKG_template,LIBNET,${PKG_NAME},${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION}))
-
CONFIGURE_ENV+= ac_cv_libnet_endianess=${ENDIAN} \
ac_cv_lbl_unaligned_fail=no
-post-install:
+libnet-install:
${INSTALL_DIR} ${IDIR_LIBNET}/usr/lib
- ${CP} ${WRKINST}/usr/lib/libnet.so* ${IDIR_LIBNET}/usr/lib/
+ ${CP} ${WRKINST}/usr/lib/libnet.so* ${IDIR_LIBNET}/usr/lib
+
+libnet-dev-install:
+ ${INSTALL_DIR} ${IDIR_LIBNET_DEV}/usr/include
+ ${CP} ${WRKINST}/usr/include/* ${IDIR_LIBNET_DEV}/usr/include
+ ${INSTALL_DIR} ${IDIR_LIBNET_DEV}/usr/bin
+ ${INSTALL_BIN} ${WRKINST}/usr/bin/libnet-config \
+ ${IDIR_LIBNET_DEV}/usr/bin
include ${TOPDIR}/mk/pkg-bottom.mk