Hi, this patch cleans the package Makefile a little and adds 3 patches to:
- fix Makefile.in - link faifa against the static library - a fix for 64 bits devices -Raphaël
diff '--exclude=.svn' -pruN net/faifa.orig/Makefile net/faifa/Makefile --- net/faifa.orig/Makefile 2010-03-19 11:35:42.000000000 +0100 +++ net/faifa/Makefile 2010-03-19 15:56:48.000000000 +0100 @@ -1,5 +1,5 @@ # -# Copyright (C) 2009 OpenWrt.org +# Copyright (C) 2006-2010 OpenWrt.org # # This is free software, licensed under the GNU General Public License v2. # See /LICENSE for more information. @@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=faifa -PKG_REV:=50 +PKG_REV:=53 PKG_VERSION:=r$(PKG_REV) PKG_RELEASE:=1 @@ -18,42 +18,41 @@ PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VER PKG_SOURCE_VERSION:=$(PKG_REV) PKG_SOURCE_PROTO:=svn -include $(INCLUDE_DIR)/package.mk +PKG_INSTALL:=1 -TARGET_CFLAGS += $(FPIC) +include $(INCLUDE_DIR)/package.mk define Package/faifa SECTION:=net CATEGORY:=Network DEPENDS:=+libpthread +libopenssl +libpcap TITLE:=configure HomePlug 1.0/AV PLC devices - URL:=http://open-plc.org + URL:=http://open-plc.org/ endef define Package/faifa/description - Faifa can configure any Intellon-based Power Line Communication - device using Intellon INT5000 and INT6000 series chips - (6000 and 6300 chips). It supports all Intellon-specific management - and control frames as well as standard management frames. +Faifa can configure any Intellon-based Power Line Communication device using +Intellon INT5000 and INT6000 series chips (6000 and 6300 chips). It supports all +Intellon-specific management and control frames as well as standard management +frames. endef +TARGET_CFLAGS += $(FPIC) + +MAKE_FLAGS += \ + OS=LINUX \ + SVN_REV=$(PKG_REV) \ + CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \ + LDFLAGS="$(TARGET_LDFLAGS)" + define Build/Configure (cd $(PKG_BUILD_DIR); ./autogen.sh) $(call Build/Configure/Default) endef -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR) \ - $(TARGET_CONFIGURE_OPTS) \ - CFLAGS="$(TARGET_CFLAGS) -DSVN_REV=$(PKG_REV) $(TARGET_CPPFLAGS)" \ - LDFLAGS="$(TARGET_LDFLAGS)" \ - DESTDIR="$(PKG_INSTALL_DIR)" \ - faifa -endef - define Package/faifa/install - $(INSTALL_DIR) $(1)/usr/sbin - $(CP) $(PKG_BUILD_DIR)/faifa $(1)/usr/sbin/ + $(INSTALL_DIR) $(1)/usr/bin + $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/faifa $(1)/usr/bin/ endef $(eval $(call BuildPackage,faifa)) diff '--exclude=.svn' -pruN net/faifa.orig/patches/100-makefile_misc_fixes.patch net/faifa/patches/100-makefile_misc_fixes.patch --- net/faifa.orig/patches/100-makefile_misc_fixes.patch 1970-01-01 01:00:00.000000000 +0100 +++ net/faifa/patches/100-makefile_misc_fixes.patch 2010-03-19 15:49:52.000000000 +0100 @@ -0,0 +1,79 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -12,6 +12,7 @@ + # + + CC = @CC@ ++STRIP = @STRIP@ + CFLAGS = @CFLAGS@ + INSTALL = @INSTALL@ + LIBS = @LIBS@ +@@ -24,9 +25,9 @@ libdir = @libdir@ + datarootdir = @datarootdir@ + includedir = @includedir@ + +-OS=$(shell uname -s | tr a-z A-Z) ++OS?=$(shell uname -s | tr a-z A-Z) + APP:=faifa +-SVN_REV?=$(shell LC_ALL=C svn info | grep "Revision" | awk '{ print $$2}') ++SVN_REV?=$(shell LC_ALL=C svn info | awk '/Revision/ { print $$2 }') + + # Object files for the library + LIB_OBJS:=faifa.o frame.o crypto.o +@@ -72,39 +73,37 @@ clean: + $(MANFIL) + + autoclean: +- -rm configure config.log config.status Makefile ++ -rm -f configure config.log config.status Makefile + + distclean: clean autoclean + + install: installman strip +- $(INSTALL) -d $(DESTDIR)/$(bindir) +- $(INSTALL) -m0755 $(APP) $(DESTDIR)/$(bindir) +- $(INSTALL) -d $(DESTDIR)/$(libdir) +- $(INSTALL) -m0644 $(LIB_SONAME) $(DESTDIR)/$(libdir) +- $(INSTALL) -d $(DESTDIR)/$(includedir)/faifa +- cp $(HEADERS) $(DESTDIR)/$(includedir)/faifa ++ $(INSTALL) -d $(DESTDIR)$(bindir) ++ $(INSTALL) -m0755 $(APP) $(DESTDIR)$(bindir) ++ $(INSTALL) -d $(DESTDIR)$(libdir) ++ $(INSTALL) -m0644 $(LIB_SONAME) $(DESTDIR)$(libdir) ++ $(INSTALL) -d $(DESTDIR)$(includedir)/faifa ++ cp $(HEADERS) $(DESTDIR)$(includedir)/faifa + + strip: +- strip $(APP) +- strip $(LIB_SONAME) ++ $(STRIP) $(APP) ++ $(STRIP) $(LIB_SONAME) + + man: +- -rm $(MANFIL) +- cp $(APP).$(MANTYP) $(APP).$(MANTYP).orig +- gzip -9v $(APP).$(MANTYP) +- mv $(APP).$(MANTYP).orig $(APP).$(MANTYP) ++ -rm -f $(MANFIL) ++ gzip -c -q -9v $(APP).$(MANTYP) > $(MANFIL) + + installman: man +- $(INSTALL) -d $(DESTDIR)/$(man8dir) +- $(INSTALL) -m0644 $(MANFIL) $(DESTDIR)/$(man8dir) ++ $(INSTALL) -d $(DESTDIR)$(man8dir) ++ $(INSTALL) -m0644 $(MANFIL) $(DESTDIR)$(man8dir) + + uninstallman: +- -rm $(DESTDIR)/$(man8dir)/$(MANFIL) ++ -rm -f $(DESTDIR)$(man8dir)/$(MANFIL) + + uninstall: uninstallman +- -rm $(DESTDIR)/$(bindir)/$(APP) +- -rm $(DESTDIR)/$(libdir)/$(LIB_SONAME) +- -rm -r $(DESTDIR)/$(includedir)/faifa ++ -rm -f $(DESTDIR)$(bindir)/$(APP) ++ -rm -f $(DESTDIR)$(libdir)/$(LIB_SONAME) ++ -rm -f $(DESTDIR)$(includedir)/faifa + + .PHONY: + clean diff '--exclude=.svn' -pruN net/faifa.orig/patches/110-makefile_use_static_lib.patch net/faifa/patches/110-makefile_use_static_lib.patch --- net/faifa.orig/patches/110-makefile_use_static_lib.patch 1970-01-01 01:00:00.000000000 +0100 +++ net/faifa/patches/110-makefile_use_static_lib.patch 2010-03-19 15:47:49.000000000 +0100 @@ -0,0 +1,13 @@ +--- a/Makefile.in ++++ b/Makefile.in +@@ -53,8 +53,8 @@ MANFIL=$(APP).8.gz + + all: $(APP) $(LIB_NAME).a $(LIB_SONAME) + +-$(APP): $(OBJS) $(HEADERS) $(LIB_SONAME) +- $(CC) -D$(OS) -DSVN_REV=$(SVN_REV) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(LIB_SONAME) ++$(APP): $(OBJS) $(HEADERS) $(LIB_NAME).a ++ $(CC) -D$(OS) -DSVN_REV=$(SVN_REV) $(CFLAGS) -o $@ $(OBJS) $(LIBS) $(LIB_NAME).a + + $(LIB_NAME).a: $(LIB_OBJS) $(HEADERS) + $(AR) rcs $(LIB_NAME).a $(LIB_OBJS) diff '--exclude=.svn' -pruN net/faifa.orig/patches/200-64bits_fix.patch net/faifa/patches/200-64bits_fix.patch --- net/faifa.orig/patches/200-64bits_fix.patch 1970-01-01 01:00:00.000000000 +0100 +++ net/faifa/patches/200-64bits_fix.patch 2010-03-19 15:47:49.000000000 +0100 @@ -0,0 +1,12 @@ +--- a/frame.c ++++ b/frame.c +@@ -2592,7 +2592,8 @@ static int ask_for_frame(u_int16_t *mmty + } + } + faifa_printf(out_stream, "\nChoose the frame type (Ctrl-C to exit): 0x"); +- fscanf(in_stream, "%4x", (unsigned int *)mmtype); ++ fscanf(in_stream, "%4x", &i); ++ *mmtype = (u_int16_t)(0xFFFF & i); + + return (*mmtype != 0xFFFF); + }
_______________________________________________ openwrt-devel mailing list [email protected] https://lists.openwrt.org/mailman/listinfo/openwrt-devel
