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 dev package * fixed patch loop
This commit is contained in:
45
Makefile
45
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 = gdbm
|
||||||
ARCH = x86_64
|
export DEPENDS = glibc
|
||||||
URL = http://www.gnu.org.ua/software/gdbm/
|
export ARCH = x86_64
|
||||||
|
export URL = http://www.gnu.org.ua/software/gdbm/
|
||||||
|
BRIEF = Library of database functions
|
||||||
DESC = GNU dbm (or GDBM, for short) is a library of database functions that \
|
DESC = GNU dbm (or GDBM, for short) is a library of database functions that \
|
||||||
use extensible hashing and work similar to the standard UNIX dbm.
|
use extensible hashing and work similar to the standard UNIX dbm.
|
||||||
SNAPVER = sr0
|
SNAPVER = 2
|
||||||
|
|
||||||
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)/gdbm-dev
|
||||||
MAKEINST = make install
|
DEVROOT := $(DEV)/ROOT
|
||||||
SNAPHACKS =
|
|
||||||
|
|
||||||
include /usr/share/snap/Makefile.snaplinux
|
include /usr/share/snap/Makefile.snaplinux
|
||||||
|
|
||||||
@@ -43,21 +45,20 @@ $(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 \
|
||||||
--disable-static \
|
|
||||||
--enable-libgdbm-compat \
|
--enable-libgdbm-compat \
|
||||||
--build=x86_64-snap-linux-gnu \
|
--build=x86_64-snap-linux-gnu \
|
||||||
--host=x86_64-snap-linux-gnu \
|
--host=x86_64-snap-linux-gnu \
|
||||||
--target=x86_64-snap-linux-gnu
|
--target=x86_64-snap-linux-gnu
|
||||||
|
|
||||||
$(SRCDIR)/src/gdbm_dump: $(SRCDIR)/config.log
|
$(SRCDIR)/src/gdbm_dump: $(SRCDIR)/config.log
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR) && make
|
||||||
$(MAKE)
|
|
||||||
|
|
||||||
$(ROOT): $(SRCDIR)/src/gdbm_dump
|
$(ROOT): $(SRCDIR)/src/gdbm_dump
|
||||||
@if [ -d $(ROOT) ]; then \
|
@if [ -d $(ROOT) ]; then \
|
||||||
@@ -66,10 +67,19 @@ $(ROOT): $(SRCDIR)/src/gdbm_dump
|
|||||||
mkdir -v $(ROOT); \
|
mkdir -v $(ROOT); \
|
||||||
fi
|
fi
|
||||||
|
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR) && make install DESTDIR=$(ROOT) && \
|
||||||
$(MAKEINST) DESTDIR=$(ROOT)
|
rm -v $(ROOT)/usr/share/info/dir
|
||||||
|
|
||||||
@$(SNAPHACKS)
|
@install -v -d $(DEV)/SNAP && \
|
||||||
|
install -v -d $(DEVROOT) && \
|
||||||
|
echo "DEV: $(DEV)" && echo "DEVROOT: $(DEVROOT)" && \
|
||||||
|
for file in `find $(ROOT)|egrep 'man3\/|\.a$$|\.h$$'`; do \
|
||||||
|
path=`dirname $$file|sed "s[$(ROOT)[$(DEVROOT)["`; \
|
||||||
|
mkdir -p $$path; \
|
||||||
|
mv $$file $$path; \
|
||||||
|
done && \
|
||||||
|
find $(ROOT) -type d -empty -delete && \
|
||||||
|
cd $(DEV) && make -f ../Makefile.gdbm-dev && mv *.snap ../
|
||||||
|
|
||||||
test: $(ROOT)
|
test: $(ROOT)
|
||||||
@cd $(SRCDIR); \
|
@cd $(SRCDIR); \
|
||||||
@@ -77,6 +87,7 @@ test: $(ROOT)
|
|||||||
|
|
||||||
clean:
|
clean:
|
||||||
@rm -rvf $(ROOT) \
|
@rm -rvf $(ROOT) \
|
||||||
|
$(DEV) \
|
||||||
$(SNAPINFO) \
|
$(SNAPINFO) \
|
||||||
$(MANIFEST) \
|
$(MANIFEST) \
|
||||||
$(FILES) \
|
$(FILES) \
|
||||||
|
|||||||
15
Makefile.gdbm-dev
Normal file
15
Makefile.gdbm-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 = gdbm
|
||||||
|
BRIEF = Development files for gdbm
|
||||||
|
DESC = Development files for gdbm
|
||||||
|
|
||||||
|
include /usr/share/snap/Makefile.snaplinux
|
||||||
Reference in New Issue
Block a user