The following changes were made:
* split into separate db, db-dev, and db-doc packages * added some dependencies * moved to new version scheme * removed old SNAPHACKS * updated patch loop
This commit is contained in:
58
Makefile
58
Makefile
@@ -8,24 +8,31 @@
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
|
||||
DEPENDS =
|
||||
ARCH = x86_64
|
||||
URL = https://www.oracle.com/database/berkeley-db/index.html
|
||||
DESC = Berkeley DB is a family of embedded key-value database libraries
|
||||
SNAPVER = sr0
|
||||
export ARCH = x86_64
|
||||
export DEPENDS = db,glibc,libgcc,libstdc++
|
||||
export BUILDDEPS =
|
||||
export SRCPKG = $(PACKAGE)
|
||||
export URL = https://www.oracle.com/database/berkeley-db/index.html
|
||||
REPO = main
|
||||
BRIEF = Berkeley DB database libraries
|
||||
DESC = Berkeley DB is a family of embedded key-value database libraries \
|
||||
providing scalable high-performance data management services to applications.
|
||||
SNAPVER = 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')
|
||||
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 docdir=/usr/share/doc/$(PACKAGE) install
|
||||
SNAPHACKS =
|
||||
export VERSION := $(shell echo $(SRCDIR)|egrep -o '\-[0-9].*'| \
|
||||
sed 's/^-//')-$(SNAPVER)
|
||||
|
||||
include /usr/share/snap/Makefile.snaplinux
|
||||
|
||||
DEV := $(PWD)/$(PACKAGE)-dev
|
||||
DEVROOT := $(DEV)/ROOT
|
||||
DOC := $(PWD)/$(PACKAGE)-doc
|
||||
DOCROOT := $(DOC)/ROOT
|
||||
|
||||
$(SRCDIR)/dist/configure: $(ARCHIVE)
|
||||
@if [ '$(TYPE)' == 'application/x-bzip2' ]; then \
|
||||
tar -jxf $(ARCHIVE); \
|
||||
@@ -42,20 +49,21 @@ $(SRCDIR)/dist/configure: $(ARCHIVE)
|
||||
@touch $(SRCDIR)/dist/configure
|
||||
|
||||
$(SRCDIR)/build_unix/config.log: $(SRCDIR)/dist/configure
|
||||
@cd $(SRCDIR)/build_unix; \
|
||||
@cd $(SRCDIR)/build_unix && \
|
||||
for patch in `find $(PATCHDIR) -name \*.patch|sort`; do \
|
||||
patch --verbose -Np1 -i $$patch; \
|
||||
done && \
|
||||
../dist/configure \
|
||||
--prefix=/usr \
|
||||
--enable-compat185 \
|
||||
--enable-dbm \
|
||||
--enable-cxx \
|
||||
--disable-static \
|
||||
--build=x86_64-snap-linux-gnu \
|
||||
--host=x86_64-snap-linux-gnu \
|
||||
--target=x86_64-snap-linux-gnu
|
||||
|
||||
$(SRCDIR)/build_unix/db_verify.o: $(SRCDIR)/build_unix/config.log
|
||||
@cd $(SRCDIR)/build_unix; \
|
||||
$(MAKE)
|
||||
@cd $(SRCDIR)/build_unix && make
|
||||
|
||||
$(ROOT): $(SRCDIR)/build_unix/db_verify.o
|
||||
@if [ -d $(ROOT) ]; then \
|
||||
@@ -64,13 +72,27 @@ $(ROOT): $(SRCDIR)/build_unix/db_verify.o
|
||||
mkdir -v $(ROOT); \
|
||||
fi
|
||||
|
||||
@cd $(SRCDIR)/build_unix; \
|
||||
$(MAKEINST) DESTDIR=$(ROOT)
|
||||
|
||||
@$(SNAPHACKS)
|
||||
@cd $(SRCDIR)/build_unix && make docdir=/usr/share/doc/$(PACKAGE) \
|
||||
install DESTDIR=$(ROOT) && \
|
||||
install -v -d $(DEV)/SNAP && \
|
||||
install -v -d $(DEVROOT) && \
|
||||
install -v -d $(DOC)/SNAP && \
|
||||
install -v -d -m 0755 $(DOCROOT)/usr/share && \
|
||||
for file in `find $(ROOT)| \
|
||||
egrep 'man3\/|pkgconfig\/|\.a$$|\.h$$|\.la$$|\.m4$$|\.pc$$'`; do \
|
||||
path=`dirname $$file|sed "s[$(ROOT)[$(DEVROOT)["`; \
|
||||
mkdir -p $$path; \
|
||||
mv $$file $$path; \
|
||||
done
|
||||
@mv -v $(ROOT)/usr/share/doc $(DOCROOT)/usr/share/doc && \
|
||||
find $(ROOT) -type d -empty -delete && \
|
||||
cd $(DEV) && make -f ../Makefile.$(PACKAGE)-dev && mv *.snap ../ && \
|
||||
cd $(DOC) && make -f ../Makefile.$(PACKAGE)-doc && mv *.snap ../
|
||||
|
||||
clean:
|
||||
@rm -rvf $(ROOT) \
|
||||
$(DEV) \
|
||||
$(DOC) \
|
||||
$(SNAPINFO) \
|
||||
$(MANIFEST) \
|
||||
$(FILES) \
|
||||
|
||||
16
Makefile.db-dev
Normal file
16
Makefile.db-dev
Normal file
@@ -0,0 +1,16 @@
|
||||
# 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 = db
|
||||
REPO = dev
|
||||
BRIEF = Development files for db
|
||||
DESC = Development files for db
|
||||
|
||||
include /usr/share/snap/Makefile.snaplinux
|
||||
16
Makefile.db-doc
Normal file
16
Makefile.db-doc
Normal file
@@ -0,0 +1,16 @@
|
||||
# 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 = db
|
||||
REPO = dev
|
||||
BRIEF = Documentation for db
|
||||
DESC = Documentation for db
|
||||
|
||||
include /usr/share/snap/Makefile.snaplinux
|
||||
Reference in New Issue
Block a user