The following changes were made to Makefile:
* added BRIEF * moved to new version scheme * moved make and make install out of variables * split off separate libcap-dev
This commit is contained in:
43
Makefile
43
Makefile
@@ -8,22 +8,24 @@
|
|||||||
# 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 =
|
export SRCPKG = libcap
|
||||||
ARCH = x86_64
|
export DEPENDS =
|
||||||
URL = https://sites.google.com/site/fullycapable/
|
export ARCH = x86_64
|
||||||
|
export URL = https://sites.google.com/site/fullycapable/
|
||||||
|
BRIEF = Library for POSIX.1e functionality
|
||||||
DESC = This is a library for getting and setting POSIX.1e (formerly POSIX 6) \
|
DESC = This is a library for getting and setting POSIX.1e (formerly POSIX 6) \
|
||||||
draft 15 capabilities.
|
draft 15 capabilities.
|
||||||
SNAPVER = sr0
|
SNAPVER = 1
|
||||||
|
|
||||||
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')
|
||||||
SRCDIR := $(shell tar -tf $(ARCHIVE)|head -1|sed 's/\/.*//')
|
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)
|
export VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'| \
|
||||||
|
sed 's/^-//')-$(SNAPVER)
|
||||||
|
|
||||||
MAKE = make
|
DEV := $(PWD)/libcap-dev
|
||||||
MAKEINST = make RAISE_SETFCAP=no prefix=/usr install
|
DEVROOT := $(DEV)/ROOT
|
||||||
SNAPHACKS =
|
|
||||||
|
|
||||||
include /usr/share/snap/Makefile.snaplinux
|
include /usr/share/snap/Makefile.snaplinux
|
||||||
|
|
||||||
@@ -43,11 +45,11 @@ $(SRCDIR)/Makefile: $(ARCHIVE)
|
|||||||
@touch $(SRCDIR)/Makefile
|
@touch $(SRCDIR)/Makefile
|
||||||
|
|
||||||
$(SRCDIR)/progs/setcap: $(SRCDIR)/Makefile
|
$(SRCDIR)/progs/setcap: $(SRCDIR)/Makefile
|
||||||
@cd $(SRCDIR) && for patch in `find $(PATCHDIR) -name \*.patch`; do \
|
@cd $(SRCDIR) && \
|
||||||
|
for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \
|
||||||
patch --verbose -Np1 -i $$patch; \
|
patch --verbose -Np1 -i $$patch; \
|
||||||
done
|
done
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR) && make
|
||||||
$(MAKE)
|
|
||||||
|
|
||||||
$(ROOT): $(SRCDIR)/progs/setcap
|
$(ROOT): $(SRCDIR)/progs/setcap
|
||||||
@if [ -d $(ROOT) ]; then \
|
@if [ -d $(ROOT) ]; then \
|
||||||
@@ -56,17 +58,22 @@ $(ROOT): $(SRCDIR)/progs/setcap
|
|||||||
mkdir -v $(ROOT); \
|
mkdir -v $(ROOT); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR) && make RAISE_SETFCAP=no prefix=/usr \
|
||||||
$(MAKEINST) DESTDIR=$(ROOT)
|
install DESTDIR=$(ROOT)
|
||||||
|
|
||||||
@$(SNAPHACKS)
|
@install -v -d $(DEV)/SNAP && \
|
||||||
|
install -v -d $(DEVROOT) && \
|
||||||
test: $(ROOT)
|
for file in `find $(ROOT)|egrep 'man3\/|pkgconfig\/|\.a$$|\.h$$'`; do \
|
||||||
@cd $(SRCDIR); \
|
path=`dirname $$file|sed "s[$(ROOT)[$(DEVROOT)["`; \
|
||||||
make test
|
mkdir -p $$path; \
|
||||||
|
mv $$file $$path; \
|
||||||
|
done && \
|
||||||
|
find $(ROOT) -type d -empty -delete && \
|
||||||
|
cd $(DEV) && make -f ../Makefile.libcap-dev && mv *.snap ../
|
||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rvf $(ROOT) \
|
@rm -rvf $(ROOT) \
|
||||||
|
$(DEV) \
|
||||||
$(SNAPINFO) \
|
$(SNAPINFO) \
|
||||||
$(MANIFEST) \
|
$(MANIFEST) \
|
||||||
$(FILES) \
|
$(FILES) \
|
||||||
|
|||||||
15
Makefile.libcap-dev
Normal file
15
Makefile.libcap-dev
Normal file
@@ -0,0 +1,15 @@
|
|||||||
|
# This file is free software; you can redistribute it and/or modify
|
||||||
|
# it under the terms of the GNU General Public License version 2 as
|
||||||
|
# published by the Free Software Foundation here:
|
||||||
|
# (http://www.gnu.org/licenses/gpl-2.0.html)
|
||||||
|
#
|
||||||
|
# This program is distributed in the hope that it will be useful,
|
||||||
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||||
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||||
|
# GNU General Public License for more details.
|
||||||
|
|
||||||
|
DEPENDS = libcap
|
||||||
|
BRIEF = Development files for libcap
|
||||||
|
DESC = Development files for libcap
|
||||||
|
|
||||||
|
include /usr/share/snap/Makefile.snaplinux
|
||||||
@@ -1,11 +0,0 @@
|
|||||||
diff -Naur a/libcap/Makefile b/libcap/Makefile
|
|
||||||
--- a/libcap/Makefile 2016-01-30 18:01:41.000000000 -0600
|
|
||||||
+++ b/libcap/Makefile 2016-09-29 11:24:21.488000000 -0500
|
|
||||||
@@ -66,7 +66,6 @@
|
|
||||||
mkdir -p -m 0755 $(FAKEROOT)$(INCDIR)/sys
|
|
||||||
install -m 0644 include/sys/capability.h $(FAKEROOT)$(INCDIR)/sys
|
|
||||||
mkdir -p -m 0755 $(FAKEROOT)$(LIBDIR)
|
|
||||||
- install -m 0644 $(STALIBNAME) $(FAKEROOT)$(LIBDIR)/$(STALIBNAME)
|
|
||||||
install -m 0644 $(MINLIBNAME) $(FAKEROOT)$(LIBDIR)/$(MINLIBNAME)
|
|
||||||
ln -sf $(MINLIBNAME) $(FAKEROOT)$(LIBDIR)/$(MAJLIBNAME)
|
|
||||||
ln -sf $(MAJLIBNAME) $(FAKEROOT)$(LIBDIR)/$(LIBNAME)
|
|
||||||
Reference in New Issue
Block a user