Skip to content

Commit db9270a

Browse files
Bundle developer builds, include license
1 parent 665df4b commit db9270a

File tree

3 files changed

+58
-2
lines changed

3 files changed

+58
-2
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,5 @@ obj
77
jni/libs
88
bin
99
libs
10-
gen
10+
gen
11+
*.zip

Makefile

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ JNI_DIR := ${CURDIR}/jni
33
LIBS_DIR := ${CURDIR}/libs
44
EXTERNAL_DIR := ${CURDIR}/external
55
SQLCIPHER_DIR := ${CURDIR}/external/sqlcipher
6+
LICENSE := ${CURDIR}/SQLCIPHER_LICENSE
67
SQLCIPHER_CFLAGS := -DHAVE_USLEEP=1 -DSQLITE_HAS_CODEC \
78
-DSQLITE_DEFAULT_JOURNAL_SIZE_LIMIT=1048576 -DSQLITE_THREADSAFE=1 -DNDEBUG=1 \
89
-DSQLITE_ENABLE_MEMORY_MANAGEMENT=1 -DSQLITE_TEMP_STORE=3 \
@@ -13,7 +14,7 @@ SQLCIPHER_CFLAGS := -DHAVE_USLEEP=1 -DSQLITE_HAS_CODEC \
1314
-DSQLITE_THREADSAFE -DSQLITE_ENABLE_JSON1 -DSQLITE_ENABLE_FTS3_PARENTHESIS \
1415
-DSQLITE_ENABLE_STAT4 -DSQLITE_ENABLE_FTS5
1516

16-
.PHONEY: clean
17+
.PHONY: clean develop-zip release-zip release
1718

1819
init: init-environment build-openssl-libraries
1920

@@ -49,11 +50,39 @@ clean-ndk:
4950
clean: clean-ndk clean-java
5051
-cd ${SQLCIPHER_DIR} && \
5152
make clean
53+
rm sqlcipher-for-android-*.zip
5254

5355
distclean: clean
5456
rm -rf ${EXTERNAL_DIR}/android-libs
5557

5658
copy-libs:
5759
cp -R ${JNI_DIR}/libs/* ${LIBS_DIR}
5860

61+
release-aar:
62+
-rm ${LIBS_DIR}/sqlcipher.jar
63+
-rm ${LIBS_DIR}/sqlcipher-javadoc.jar
64+
mvn package
65+
66+
develop-zip: LATEST_TAG := $(shell git rev-parse --short HEAD)
67+
develop-zip: SECOND_LATEST_TAG := $(shell git tag | sort -r | head -1)
68+
develop-zip: release
69+
70+
release-zip: LATEST_TAG := $(shell git tag | sort -r | head -1)
71+
release-zip: SECOND_LATEST_TAG := $(shell git tag | sort -r | head -2 | tail -1)
72+
release-zip: release
73+
74+
release:
75+
$(eval RELEASE_DIR := sqlcipher-for-android-${LATEST_TAG})
76+
$(eval README := ${RELEASE_DIR}/README)
77+
$(eval CHANGE_LOG_HEADER := "Changes included in the ${LATEST_TAG} release of SQLCipher for Android:")
78+
-rm -rf ${RELEASE_DIR}
79+
-rm ${RELEASE_DIR}.zip
80+
mkdir ${RELEASE_DIR}
81+
cp -R ${LIBS_DIR}/* ${RELEASE_DIR}
82+
cp ${LICENSE} ${RELEASE_DIR}
83+
printf "%s\n\n" ${CHANGE_LOG_HEADER} > ${README}
84+
git log --pretty=format:' * %s' ${SECOND_LATEST_TAG}..${LATEST_TAG} >> ${README}
85+
find ${RELEASE_DIR} | sort -u | zip -@9 ${RELEASE_DIR}.zip
86+
rm -rf ${RELEASE_DIR}
87+
5988
all: build-amalgamation build-native build-java copy-libs

SQLCIPHER_LICENSE

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
http://sqlcipher.net
2+
3+
Copyright (c) 2010 Zetetic LLC
4+
All rights reserved.
5+
6+
Redistribution and use in source and binary forms, with or without
7+
modification, are permitted provided that the following conditions are met:
8+
* Redistributions of source code must retain the above copyright
9+
notice, this list of conditions and the following disclaimer.
10+
* Redistributions in binary form must reproduce the above copyright
11+
notice, this list of conditions and the following disclaimer in the
12+
documentation and/or other materials provided with the distribution.
13+
* Neither the name of the ZETETIC LLC nor the
14+
names of its contributors may be used to endorse or promote products
15+
derived from this software without specific prior written permission.
16+
17+
THIS SOFTWARE IS PROVIDED BY ZETETIC LLC ''AS IS'' AND ANY
18+
EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
19+
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
20+
DISCLAIMED. IN NO EVENT SHALL ZETETIC LLC BE LIABLE FOR ANY
21+
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
22+
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
23+
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
24+
ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25+
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
26+
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

0 commit comments

Comments
 (0)