ddrescue: fix target build
authorBaruch Siach <baruch@tkos.co.il>
Thu, 9 Feb 2017 19:50:18 +0000 (21:50 +0200)
committerThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Thu, 9 Feb 2017 20:39:15 +0000 (21:39 +0100)
ddrescue is not an autotools package. Convert to generic package to make
it build correctly for target architecture.

Cc: Peter Seiderer <ps.report@gmx.net>
Signed-off-by: Baruch Siach <baruch@tkos.co.il>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
package/ddrescue/ddrescue.mk

index 23f03436e9faa18e22c5cde64a82a04d4e88ee17..145d0520d66fbb24e1f4fb6f4b1df8cce069c2d6 100644 (file)
@@ -16,4 +16,20 @@ define DDRESCUE_EXTRACT_CMDS
                tar --strip-components=1 -C $(@D) $(TAR_OPTIONS) -
 endef
 
-$(eval $(autotools-package))
+define DDRESCUE_CONFIGURE_CMDS
+       (cd $(@D); \
+               $(TARGET_MAKE_ENV) ./configure \
+               --prefix=/usr \
+               $(TARGET_CONFIGURE_OPTS) \
+       )
+endef
+
+define DDRESCUE_BUILD_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D)
+endef
+
+define DDRESCUE_INSTALL_TARGET_CMDS
+       $(TARGET_MAKE_ENV) $(MAKE) -C $(@D) DESTDIR="$(TARGET_DIR)" install
+endef
+
+$(eval $(generic-package))