Fixed path problem with /sbin
This commit is contained in:
30
Makefile
30
Makefile
@@ -8,11 +8,11 @@
|
|||||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
# GNU General Public License for more details.
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
DEPENDS =
|
DEPENDS = glibc,ncurses,readline
|
||||||
ARCH = x86_64
|
ARCH = x86_64
|
||||||
URL = https://www.gnu.org/software/inetutils/
|
URL = https://www.gnu.org/software/inetutils/
|
||||||
DESC = Inetutils is a collection of common network programs.
|
DESC = Inetutils is a collection of common network programs.
|
||||||
SNAPVER = sr0
|
SNAPVER = sr2
|
||||||
|
|
||||||
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
|
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
|
||||||
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
|
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
|
||||||
@@ -20,12 +20,6 @@ SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
|
|||||||
PATCHDIR := $(PWD)/SRC/patches
|
PATCHDIR := $(PWD)/SRC/patches
|
||||||
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')$(SNAPVER)
|
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')$(SNAPVER)
|
||||||
|
|
||||||
MAKE = make
|
|
||||||
MAKEINST = make install
|
|
||||||
SNAPHACKS = install -d -m 755 $(ROOT)/bin && \
|
|
||||||
mv -v $(ROOT)/usr/bin/{hostname,ping{,6},traceroute} $(ROOT)/bin && \
|
|
||||||
mv -v $(ROOT)/usr/bin/ifconfig /sbin
|
|
||||||
|
|
||||||
include /usr/share/snap/Makefile.snaplinux
|
include /usr/share/snap/Makefile.snaplinux
|
||||||
|
|
||||||
$(SRCDIR)/configure: $(ARCHIVE)
|
$(SRCDIR)/configure: $(ARCHIVE)
|
||||||
@@ -44,9 +38,10 @@ $(SRCDIR)/configure: $(ARCHIVE)
|
|||||||
@touch $(SRCDIR)/configure
|
@touch $(SRCDIR)/configure
|
||||||
|
|
||||||
$(SRCDIR)/config.log: $(SRCDIR)/configure
|
$(SRCDIR)/config.log: $(SRCDIR)/configure
|
||||||
@if [ -f $(PATCHDIR)/*.patch ]; then \
|
@cd $(SRCDIR) && \
|
||||||
cd $(SRCDIR) && cat $(PATCHDIR)/*.patch|patch --verbose -Np1; \
|
for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \
|
||||||
fi
|
patch --verbose -Np0 -i $$patch; \
|
||||||
|
done
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR); \
|
||||||
./configure \
|
./configure \
|
||||||
--prefix=/usr \
|
--prefix=/usr \
|
||||||
@@ -63,8 +58,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
|
|||||||
--target=x86_64-snap-linux-gnu
|
--target=x86_64-snap-linux-gnu
|
||||||
|
|
||||||
$(SRCDIR)/ifconfig/ifconfig: $(SRCDIR)/config.log
|
$(SRCDIR)/ifconfig/ifconfig: $(SRCDIR)/config.log
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR) && make
|
||||||
$(MAKE)
|
|
||||||
|
|
||||||
$(ROOT): $(SRCDIR)/ifconfig/ifconfig
|
$(ROOT): $(SRCDIR)/ifconfig/ifconfig
|
||||||
@if [ -d $(ROOT) ]; then \
|
@if [ -d $(ROOT) ]; then \
|
||||||
@@ -73,10 +67,12 @@ $(ROOT): $(SRCDIR)/ifconfig/ifconfig
|
|||||||
mkdir -v $(ROOT); \
|
mkdir -v $(ROOT); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \
|
||||||
$(MAKEINST) DESTDIR=$(ROOT)
|
install -d -m 755 $(ROOT)/bin && \
|
||||||
|
install -d -m 755 $(ROOT)/sbin && \
|
||||||
@$(SNAPHACKS)
|
mv -v $(ROOT)/usr/bin/{hostname,ping{,6},traceroute} $(ROOT)/bin && \
|
||||||
|
mv -v $(ROOT)/usr/bin/ifconfig $(ROOT)/sbin && \
|
||||||
|
rm -v $(ROOT)/usr/share/info/dir
|
||||||
|
|
||||||
test: $(ROOT)
|
test: $(ROOT)
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR); \
|
||||||
|
|||||||
Reference in New Issue
Block a user