Ver Fonte

gptfdisk: add new package

Waldemar Brodkorb há 8 anos atrás
pai
commit
284b7b24de

+ 42 - 0
package/gptfdisk/Makefile

@@ -0,0 +1,42 @@
+# This file is part of the OpenADK project. OpenADK is copyrighted
+# material, please see the LICENCE file in the top-level directory.
+
+include $(ADK_TOPDIR)/rules.mk
+
+PKG_NAME:=		gptfdisk
+PKG_VERSION:=		1.0.1
+PKG_RELEASE:=		1
+PKG_HASH:=		864c8aee2efdda50346804d7e6230407d5f42a8ae754df70404dd8b2fdfaeac7
+PKG_DESCR:=		utilities to create gpt partition tables
+PKG_SECTION:=		sys/fs
+PKG_BUILDDEP:=		util-linux popt
+HOST_BUILDDEP:=		util-linux-host popt-host
+PKG_URL:=		http://www.rodsbooks.com/gdisk/
+PKG_SITES:=		${MASTER_SITE_SOURCEFORGE:=gptfdisk/}
+
+DISTFILES:=		$(PKG_NAME)-$(PKG_VERSION).tar.gz
+
+include $(ADK_TOPDIR)/mk/host.mk
+include $(ADK_TOPDIR)/mk/package.mk
+
+$(eval $(call HOST_template,GPTFDISK,gptfdisk,$(PKG_VERSION)-$(PKG_RELEASE)))
+$(eval $(call PKG_template,GPTFDISK,gptfdisk,$(PKG_VERSION)-$(PKG_RELEASE),$(PKG_DEPENDS),$(PKG_DESCR),$(PKG_SECTION)))
+
+HOST_STYLE:=		manual
+CONFIG_STYLE:=		manual
+INSTALL_STYLE:=		manual
+
+host-build:
+	(cd ${WRKBUILD} && env ${HOST_MAKE_ENV} ${MAKE} -f ${MAKE_FILE} \
+		${HOST_MAKE_FLAGS} ${ALL_TARGET})
+
+gptfdisk-hostinstall:
+	$(CP) $(WRKBUILD)/{g,sg,cg}disk \
+		$(STAGING_HOST_DIR)/usr/bin
+
+gptfdisk-install:
+	$(INSTALL_DIR) $(IDIR_GPTFDISK)/usr/sbin
+	$(INSTALL_BIN) $(WRKBUILD)/{g,sg,cg}disk $(IDIR_GPTFDISK)/usr/sbin
+
+include $(ADK_TOPDIR)/mk/host-bottom.mk
+include $(ADK_TOPDIR)/mk/pkg-bottom.mk

+ 19 - 0
package/gptfdisk/patches/patch-Makefile

@@ -0,0 +1,19 @@
+--- gptfdisk-1.0.1.orig/Makefile	2015-10-19 00:35:18.000000000 +0200
++++ gptfdisk-1.0.1/Makefile	2016-09-12 22:33:25.606675951 +0200
+@@ -1,5 +1,5 @@
+-CC=gcc
+-CXX=g++
++CC?=gcc
++CXX?=g++
+ CFLAGS+=-D_FILE_OFFSET_BITS=64
+ #CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64 -D USE_UTF16
+ CXXFLAGS+=-Wall -D_FILE_OFFSET_BITS=64
+@@ -18,7 +18,7 @@ gdisk:	$(LIB_OBJS) gdisk.o gpttext.o
+ #	$(CXX) $(LIB_OBJS) gdisk.o gpttext.o $(LDFLAGS) -licuio -licuuc -luuid -o gdisk
+ 
+ cgdisk: $(LIB_OBJS) cgdisk.o gptcurses.o
+-	$(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -luuid -lncursesw -o cgdisk
++	$(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -luuid -lncurses -ltinfo -o cgdisk
+ #	$(CXX) $(LIB_OBJS) cgdisk.o gptcurses.o $(LDFLAGS) -licuio -licuuc -luuid -lncurses -o cgdisk
+ 
+ sgdisk: $(LIB_OBJS) sgdisk.o gptcl.o

+ 3 - 0
package/popt/Makefile

@@ -16,12 +16,15 @@ PKG_OPTS:=		dev
 
 DISTFILES:=		${PKG_NAME}-${PKG_VERSION}.tar.gz
 
+include ${ADK_TOPDIR}/mk/host.mk
 include ${ADK_TOPDIR}/mk/package.mk
 
+$(eval $(call HOST_template,POPT,popt,${PKG_VERSION}-${PKG_RELEASE}))
 $(eval $(call PKG_template,LIBPOPT,libpopt,${PKG_VERSION}-${PKG_RELEASE},${PKG_DEPENDS},${PKG_DESCR},${PKG_SECTION},${PKG_OPTS}))
 
 libpopt-install:
 	${INSTALL_DIR} ${IDIR_LIBPOPT}/usr/lib
 	${CP} ${WRKINST}/usr/lib/libpopt.so* ${IDIR_LIBPOPT}/usr/lib
 
+include ${ADK_TOPDIR}/mk/host-bottom.mk
 include ${ADK_TOPDIR}/mk/pkg-bottom.mk

+ 5 - 0
target/config/Config.in.tools

@@ -116,6 +116,10 @@ config ADK_HOST_BUILD_E2FSPROGS
 	bool
 	default n
 
+config ADK_HOST_BUILD_GPTFDISK
+	bool
+	default n
+
 config ADK_HOST_BUILD_MKE2IMG
 	bool
 	default n
@@ -129,6 +133,7 @@ config ADK_HOST_BUILD_GENIMAGE
 	select ADK_HOST_BUILD_MKE2IMG
 	select ADK_HOST_BUILD_MTOOLS
 	select ADK_HOST_BUILD_GENEXT2FS
+	select ADK_HOST_BUILD_GPTFDISK
 	select ADK_HOST_BUILD_E2FSPROGS
 	select ADK_HOST_BUILD_DOSFSTOOLS
 	default n