Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
K
Knot Resolver
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Packages
Packages
Container Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jonathan Coetzee
Knot Resolver
Commits
ce771486
Commit
ce771486
authored
Oct 19, 2016
by
Ondřej Surý
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bootstrap-depends.sh will cleanup local directory when changed and BOOTSTRAP_CLEANUP is set
parent
d42d95ce
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
34 additions
and
4 deletions
+34
-4
.travis.yml
.travis.yml
+1
-1
scripts/bootstrap-depends.sh
scripts/bootstrap-depends.sh
+33
-3
No files found.
.travis.yml
View file @
ce771486
...
...
@@ -30,7 +30,7 @@ env:
-
MALLOC_CHECK_=3
-
MALLOC_PERTURB_=223
before_script
:
-
./scripts/bootstrap-depends.sh ${HOME}/.local
-
BOOTSTRAP_CLEANUP=1
./scripts/bootstrap-depends.sh ${HOME}/.local
script
:
-
make -j2 install check V=1 COVERAGE=1 PREFIX=${HOME}/.local
-
./daemon/kresd -h
...
...
scripts/bootstrap-depends.sh
View file @
ce771486
#!/bin/bash
#!/bin/bash
-x
#set -e
SCRIPT_DIR
=
$(
dirname
$(
pwd
)
/
${
0
}
)
CMOCKA_TAG
=
"cmocka-0.4.1"
CMOCKA_URL
=
"git://git.cryptomilk.org/projects/cmocka.git"
LIBUV_TAG
=
"v1.x"
...
...
@@ -24,6 +26,29 @@ LIBMEMCACHED_URL="https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmem
# prepare install prefix
PREFIX
=
${
1
}
;
[
-z
${
PREFIX
}
]
&&
export
PREFIX
=
"
${
HOME
}
/.local"
function
bootstrap_cleanup
{
if
[
-n
"
$BOOTSTRAP_CLEANUP
"
]
;
then
rm
-rf
"
${
PREFIX
}
"
else
echo
"Bootstrap script has changed, you should cleanup
${
PREFIX
}
"
echo
"or rerun this script with BOOSTRAP_CLEANUP=1 env variable"
fi
}
if
[
-f
${
PREFIX
}
/.revision
]
;
then
cd
${
SCRIPT_DIR
}
if
!
shasum
-a
256
-c
${
PREFIX
}
/.revision
>
/dev/null 2>/dev/null
;
then
# bootstrap script has changed, do a clean rebuild
bootstrap_cleanup
fi
else
# failed build, etc...
if
[
-d
"
${
PREFIX
}
/"
]
;
then
bootstrap_cleanup
fi
fi
install
-d
${
PREFIX
}
/
{
lib,libexec,include,bin,sbin,man,share,etc,info,doc,var
}
# prepare build env
...
...
@@ -82,8 +107,6 @@ function pkg {
# travis-specific
PIP_PKGS
=
"dnspython==1.11 cpp-coveralls Jinja2"
if
[
"
${
TRAVIS_OS_NAME
}
"
==
"osx"
]
;
then
DEPEND_CACHE
=
"https://dl.dropboxusercontent.com/u/2255176/resolver-
${
TRAVIS_OS_NAME
}
-cache.tar.gz"
curl
"
${
DEPEND_CACHE
}
"
>
cache.tar.gz
&&
tar
-xz
-C
${
HOME
}
-f
cache.tar.gz
||
true
brew update
brew
install
--force
makedepend python hiredis libmemcached
||
true
brew
link
--overwrite
python
||
true
...
...
@@ -112,5 +135,12 @@ pkg cmocka ${CMOCKA_URL} ${CMOCKA_TAG} include/cmocka.h
pkg libuv
${
LIBUV_URL
}
${
LIBUV_TAG
}
include/uv.h
--disable-static
pkg lua
${
LUA_URL
}
${
LUA_TAG
}
lib/pkgconfig/luajit.pc
install
BUILDMODE
=
dynamic
LDFLAGS
=
-lm
PREFIX
=
${
PREFIX
}
echo
"Build success!"
# remove on successful build
rm
-rf
${
BUILD_DIR
}
cd
${
SCRIPT_DIR
}
shasum
-a
256
$(
basename
$0
)
>
${
PREFIX
}
/.revision
exit
0
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment