OpenWrt packages
Sign in or create your account | Project List | Help
OpenWrt packages Git Source Tree
Root/
| 1 | # This is free software, licensed under the GNU General Public License v2. |
| 2 | # See /LICENSE for more information. |
| 3 | |
| 4 | include $(TOPDIR)/rules.mk |
| 5 | |
| 6 | PKG_NAME:=avrdude |
| 7 | PKG_VERSION:=5.11.1 |
| 8 | |
| 9 | PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz |
| 10 | PKG_SOURCE_URL:=http://download.savannah.gnu.org/releases/avrdude/ |
| 11 | PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION) |
| 12 | PKG_RELEASE:=2 |
| 13 | PKG_INSTALL:=1 |
| 14 | |
| 15 | include $(INCLUDE_DIR)/package.mk |
| 16 | |
| 17 | define Package/avrdude |
| 18 | SECTION:=utils |
| 19 | CATEGORY:=Utilities |
| 20 | TITLE:=AVR Downloader/UploaDEr |
| 21 | URL:=http://www.bsdhome.com/avrdude/ |
| 22 | DEPENDS:=+libncurses +libusb +libreadline +libftdi +libusb-1.0 |
| 23 | endef |
| 24 | |
| 25 | define Package/avrdude/description |
| 26 | AVRDUDE is software for programming Atmel AVR Microcontrollers. |
| 27 | endef |
| 28 | |
| 29 | define Package/avrdude/conffiles |
| 30 | /etc/avrdude.conf |
| 31 | endef |
| 32 | |
| 33 | CONFIGURE_ARGS+= \ |
| 34 | --enable-shared \ |
| 35 | --disable-static \ |
| 36 | --disable-parport |
| 37 | |
| 38 | ifeq ($(CONFIG_TARGET_xburst_qi_lb60),y) |
| 39 | BEN_AVRDUDE_PATCHES_URL:=http://projects.qi-hardware.com/index.php/p/ben-blinkenlights/source/file/master/avrdude/patches |
| 40 | BEN_PATCH:=patch -Np1 |
| 41 | define Build/Prepare |
| 42 | $(call Build/Prepare/Default) |
| 43 | |
| 44 | mkdir -p $(PKG_BUILD_DIR)/nanonote-patches |
| 45 | wget -O $(PKG_BUILD_DIR)/nanonote-patches/series $(BEN_AVRDUDE_PATCHES_URL)/series |
| 46 | (cd $(PKG_BUILD_DIR); \ |
| 47 | while read L; do \ |
| 48 | wget -O $(PKG_BUILD_DIR)/nanonote-patches/$$$$L $(BEN_AVRDUDE_PATCHES_URL)/$$$$L; \ |
| 49 | $(BEN_PATCH) < nanonote-patches/$$$$L; \ |
| 50 | done < $(PKG_BUILD_DIR)/nanonote-patches/series; \ |
| 51 | ) |
| 52 | endef |
| 53 | |
| 54 | #the qi_lb60-patches have some new .c file |
| 55 | define Build/Configure |
| 56 | (cd $(PKG_BUILD_DIR); aclocal; automake) |
| 57 | $(call Build/Configure/Default) |
| 58 | endef |
| 59 | |
| 60 | #with out </dev/null. make stop at "config.status: creating avrdude.conf.tmp" |
| 61 | MAKE_FLAGS+=</dev/null |
| 62 | |
| 63 | define Build/Compile |
| 64 | $(call Build/Compile/Default) |
| 65 | # the joy of autocrap (we need this to generate avrdude.conf) |
| 66 | $(call Build/Configure/Default) |
| 67 | endef |
| 68 | endif |
| 69 | |
| 70 | define Package/avrdude/install |
| 71 | $(INSTALL_DIR) $(1)/etc |
| 72 | $(INSTALL_CONF) $(PKG_INSTALL_DIR)/etc/avrdude.conf $(1)/etc/ |
| 73 | $(INSTALL_DIR) $(1)/usr/bin |
| 74 | $(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/avrdude $(1)/usr/bin/ |
| 75 | endef |
| 76 | $(eval $(call BuildPackage,avrdude)) |
| 77 | |
| 78 | # The following comments configure the Emacs editor. Just ignore them. |
| 79 | # Local Variables: |
| 80 | # compile-command: "make -C ~/openwrt-xburst.full_system package/avrdude/{clean,compile} -j2 V=99" |
| 81 | # End: |
| 82 |
