Skip to content

Commit

Permalink
mtr: update Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
tsl0922 committed Oct 11, 2023
1 parent 2171318 commit d8c9ff5
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 40 deletions.
2 changes: 0 additions & 2 deletions trunk/user/mtr/.gitignore

This file was deleted.

50 changes: 12 additions & 38 deletions trunk/user/mtr/Makefile
Original file line number Diff line number Diff line change
@@ -1,46 +1,20 @@
#https://github.com/traviscross/mtr
SRC_NAME = mtr-0.95
SRC_URL = https://github.com/traviscross/mtr/archive/refs/tags/v0.95.tar.gz
THISDIR = $(shell pwd)
include $(ROOTDIR)/rules.mk

all: download_test extract_test config_test
$(MAKE) -j$(HOST_NCPU) -C $(SRC_NAME)
PKG_NAME:=mtr
PKG_VERSION:=0.95

download_test:
( if [ ! -f $(SRC_NAME).tar.gz ]; then \
wget -t5 --timeout=20 --no-check-certificate -O $(SRC_NAME).tar.gz $(SRC_URL); \
fi )
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
PKG_SOURCE_URL:=https://codeload.github.com/traviscross/mtr/tar.gz/v$(PKG_VERSION)?
PKG_HASH:=12490fb660ba5fb34df8c06a0f62b4f9cbd11a584fc3f6eceda0a99124e8596f

extract_test:
( if [ ! -d $(SRC_NAME) ]; then \
tar xf $(SRC_NAME).tar.gz; \
cd $(SRC_NAME) ; \
patch -p1 -i ../100-fix-ncurses-lib.diff ; \
fi )
PKG_FIXUP:=autoreconf

config_test:
( if [ -f ./config_done ]; then \
echo "the same configuration"; \
else \
make configure && touch config_done; \
fi )
include $(INCLUDE_DIR)/package.mk

configure:
( cd $(SRC_NAME) ; \
./bootstrap.sh ; \
./configure \
--prefix=/usr \
--without-gtk \
--host=$(HOST_TARGET) \
--build=$(HOST_BUILD) ; \
)
CONFIGURE_ARGS += --without-gtk

clean:
if [ -f $(SRC_NAME)/Makefile ] ; then \
$(MAKE) -C $(SRC_NAME) distclean ; \
fi ; \
rm -f config_done
$(eval $(call BuildPackage,mtr))

romfs:
$(ROMFSINST) -p +x $(THISDIR)/$(SRC_NAME)/mtr /usr/bin/mtr
$(ROMFSINST) -p +x $(THISDIR)/$(SRC_NAME)/mtr-packet /usr/bin/mtr-packet
$(INSTALL_DIR) $(ROMFSDIR)/usr/bin
$(INSTALL_BIN) $(PKG_BUILD_DIR)/mtr $(ROMFSDIR)/usr/bin/mtr
File renamed without changes.

0 comments on commit d8c9ff5

Please sign in to comment.