Fixed patches, cleaned up Makefile, added dependencies

This commit is contained in:
2016-11-02 23:34:05 -05:00
parent 653de8f1c6
commit 3628b9971f
5 changed files with 49 additions and 25 deletions

View File

@@ -8,13 +8,13 @@
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
DEPENDS =
DEPENDS = acl,attr,glibc
ARCH = x86_64
URL = http://pkg-shadow.alioth.debian.org/
DESC = This package includes the programs necessary to convert traditional \
V7 UNIX password files to the SVR4 shadow password format and additional \
tools to work with shadow passwords.
SNAPVER = sr1
SNAPVER = sr3
ARCHIVE := $(PWD)/SRC/$(shell ls SRC|egrep '(bz2|gz|tar|xz)$$'|tail -1)
TYPE := $(shell file -ib $(ARCHIVE)|cut -d';' -f1|tr -d '\n')
@@ -22,10 +22,6 @@ SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
PATCHDIR := $(PWD)/SRC/patches
VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'|sed 's/^-//')$(SNAPVER)
MAKE = make
MAKEINST = make install
SNAPHACKS =
include /usr/share/snap/Makefile.snaplinux
$(SRCDIR)/configure: $(ARCHIVE)
@@ -44,7 +40,9 @@ $(SRCDIR)/configure: $(ARCHIVE)
@touch $(SRCDIR)/configure
$(SRCDIR)/config.log: $(SRCDIR)/configure
@cd $(SRCDIR) && for patch in `find $(PATCHDIR) -name \*.patch`; do \
@cd $(SRCDIR) && \
for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \
echo "WTF: $$patch"; \
patch --verbose -Np1 -i $$patch; \
done
@cd $(SRCDIR); \
@@ -56,8 +54,7 @@ $(SRCDIR)/config.log: $(SRCDIR)/configure
--target=x86_64-snap-linux-gnu
$(SRCDIR)/src/vipw: $(SRCDIR)/config.log
@cd $(SRCDIR); \
$(MAKE)
@cd $(SRCDIR) && make
$(ROOT): $(SRCDIR)/src/vipw
@if [ -d $(ROOT) ]; then \
@@ -66,8 +63,7 @@ $(ROOT): $(SRCDIR)/src/vipw
mkdir -v $(ROOT); \
fi
@cd $(SRCDIR); \
$(MAKEINST) DESTDIR=$(ROOT)
@cd $(SRCDIR) && make install DESTDIR=$(ROOT)
@$(SNAPHACKS)