The following changes were made:

* Cleaned up creation of separate lib and dev packages
  * Corrected issue with duplicate files in attr and lib packages
  * Removed some old Makefile vars no longer used
This commit is contained in:
2018-07-28 10:03:57 -05:00
parent cc168432ae
commit cb520661bc
3 changed files with 23 additions and 33 deletions

View File

@@ -12,9 +12,10 @@ export SRCPKG = attr
export DEPENDS = glibc,libattr export DEPENDS = glibc,libattr
export ARCH = x86_64 export ARCH = x86_64
export URL = http://savannah.nongnu.org/projects/attr export URL = http://savannah.nongnu.org/projects/attr
REPO = main
BRIEF = Filesystem extended attributes utilities BRIEF = Filesystem extended attributes utilities
DESC = Commands for Manipulating Filesystem Extended Attributes DESC = Commands for Manipulating Filesystem Extended Attributes
SNAPVER = 3 SNAPVER = 4
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')
@@ -23,28 +24,24 @@ PATCHDIR := $(PWD)/SRC/patches
export VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'| \ export VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'| \
sed 's/^-//')-$(SNAPVER) sed 's/^-//')-$(SNAPVER)
LIBATTR := $(PWD)/libattr DEV := $(PWD)/libattr-dev
export LIBATTRROOT := $(LIBATTR)/ROOT DEVROOT := $(DEV)/ROOT
LIBATTRDEV := $(PWD)/libattr-dev LIB := $(PWD)/libattr
export LIBATTRDEVROOT := $(LIBATTRDEV)/ROOT LIBROOT := $(LIB)/ROOT
MAKE = make
MAKEINST = make install install-dev install-lib
SNAPHACKS =
include /usr/share/snap/Makefile.snaplinux include /usr/share/snap/Makefile.snaplinux
$(LIBATTRROOT): $(ROOT) $(LIBROOT): $(DEVROOT)
@install -v -d $(LIBATTR)/SNAP && \ @install -v -d $(LIB)/SNAP $(LIBROOT) && \
install -v -d $(LIBATTRROOT) cd $(SRCDIR) && make install-lib DESTDIR=$(LIBROOT) && \
@cd $(SRCDIR) && make install-lib DESTDIR=$(LIBATTRROOT) rm -vrf $(LIBROOT)/bin $(LIBROOT)/usr/share/locale \
@cd $(LIBATTR) && make -f ../Makefile.libattr && mv *.snap ../ $(LIBROOT)/usr/share/man && \
cd $(LIB) && make -f ../Makefile.libattr && mv *.snap ../
$(LIBATTRDEVROOT): $(ROOT) $(DEVROOT): $(ROOT)
@install -v -d $(LIBATTRDEV)/SNAP && \ @install -v -d $(DEV)/SNAP $(DEVROOT) && \
install -v -d $(LIBATTRDEVROOT) cd $(SRCDIR) && make install-dev DESTDIR=$(DEVROOT) && \
@cd $(SRCDIR) && make install-dev DESTDIR=$(LIBATTRDEVROOT) cd $(DEV) && make -f ../Makefile.libattr-dev && mv *.snap ../
@cd $(LIBATTRDEV) && make -f ../Makefile.libattrdev && mv *.snap ../
$(SRCDIR): $(ARCHIVE) $(SRCDIR): $(ARCHIVE)
@if [ '$(TYPE)' == 'application/x-bzip2' ]; then \ @if [ '$(TYPE)' == 'application/x-bzip2' ]; then \
@@ -77,23 +74,14 @@ $(SRCDIR)/config.log: $(SRCDIR)
$(SRCDIR)/attr: $(SRCDIR)/config.log $(SRCDIR)/attr: $(SRCDIR)/config.log
@cd $(SRCDIR) && make @cd $(SRCDIR) && make
$(ROOT): $(SRCDIR)/attr $(ROOT): $(SRCDIR)/attr $(DEVROOT) $(LIBROOT)
@if [ -d $(ROOT) ]; then \ @if [ -d $(ROOT) ]; then \
touch $(ROOT); \ touch $(ROOT); \
else \ else \
mkdir -v $(ROOT); \ mkdir -v $(ROOT); \
fi fi
@install -v -d $(LIBATTR)/SNAP && \ @cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \
install -v -d $(LIBATTRROOT) && \ rm -vrf $(ROOT)/usr/share/doc
install -v -d $(LIBATTRDEV)/SNAP && \
install -v -d $(LIBATTRDEVROOT) && \
cd $(SRCDIR) && make install-lib DESTDIR=$(LIBATTRROOT) && \
make install-dev DESTDIR=$(LIBATTRDEVROOT) && \
make install DESTDIR=$(ROOT) && \
gzip $(ROOT)/usr/share/doc/attr/COPYING* && \
gzip $(LIBATTRROOT)/usr/share/doc/attr/COPYING* && \
cd $(LIBATTR) && make -f ../Makefile.libattr && mv *.snap ../ && \
cd $(LIBATTRDEV) && make -f ../Makefile.libattrdev && mv *.snap ../
test: $(ROOT) test: $(ROOT)
@cd $(SRCDIR); \ @cd $(SRCDIR); \
@@ -101,8 +89,8 @@ test: $(ROOT)
clean: clean:
@rm -rvf $(ROOT) \ @rm -rvf $(ROOT) \
$(LIBATTR) \ $(DEV) \
$(LIBATTRDEV) \ $(LIB) \
$(SNAPINFO) \ $(SNAPINFO) \
$(MANIFEST) \ $(MANIFEST) \
$(FILES) \ $(FILES) \

View File

@@ -9,6 +9,7 @@
# GNU General Public License for more details. # GNU General Public License for more details.
DEPENDS = glibc DEPENDS = glibc
REPO = core
BRIEF = Access control list shared library BRIEF = Access control list shared library
DESC = Shared library for manipulating POSIX Access Control Lists DESC = Shared library for manipulating POSIX Access Control Lists

View File

@@ -9,6 +9,7 @@
# GNU General Public License for more details. # GNU General Public License for more details.
DEPENDS = glibc,libattr DEPENDS = glibc,libattr
REPO = dev
BRIEF = Access control list shared library BRIEF = Access control list shared library
DESC = Shared library for manipulating POSIX Access Control Lists DESC = Shared library for manipulating POSIX Access Control Lists