2013/5/18 jonsm...@gmail.com <jonsm...@gmail.com>: > So PKG_SOURCE_SUBDIR is not the feature I am looking for. I'm trying > to figure out how to make my package name end up different that the > name inside the source zip. > > In this case source zip has binutils-2.20.1a > I want to name the project avr-binutils. > > The problem here is that binutils can be compiled for multiple targets > - mipsel, avr, arm, whatever and these can all run on the same host. > > So I need some way to download binutils-2.20.1a, patch it and compile > it into avr-binutils so that if someone else makes a arm-binutils > package we don't end up stomping on each other with our patches. >
Hello Jon, if you really want to rename sources directory you should provide your own "Build/Prepare" package Makefile section, in which you manually unpack archive, rename output dir and patch sources: define Build/Prepare tar -xf foo-2.0.tgz -C $(BUILD_DIR) mv $(BUILD_DIR)/foo-2.0 $(BUILD_DIR)/avr-foo-2.0 cat $(PATCH_DIR)/001-bar.patch | patch -d $(BUILD_DIR)/avr-foo-2.0 ... endef Or use PKG_BUILD_DIR as another way to separate your work: PKG_NAME:=avr-foo PKG_VERSION:=2.0 PKG_RELEASE:=1 PKG_SOURCE:=foo-$(PKG_VERSION).tar.gz PKG_SOURCE_URL:=http://www.example.com/pub/foo/ PKG_BUILD_DIR:=$(BUILD_DIR)/avr-foo/foo-$(PKG_VERSION) Archive will be automatically unpacked in the "target_mipsel/avr-foo/" instead of "target_mipsel/". And all your sources will be appear in the "target_mipsel/avr-foo/foo-2.0/" directory. Use hostapd package Makefile as reference. Please note: if you have archive foo.tgz which contains single directory named foo at top level then during unpacking you automatically obtain foo directory. Because this directory came from archive but not from some command line argument. -- BR, Sergey _______________________________________________ openwrt-devel mailing list openwrt-devel@lists.openwrt.org https://lists.openwrt.org/mailman/listinfo/openwrt-devel