Skip to content

Commit

Permalink
Import debian directory
Browse files Browse the repository at this point in the history
  • Loading branch information
tobydox committed Jan 22, 2020
1 parent 5a27f42 commit 962ba08
Show file tree
Hide file tree
Showing 8 changed files with 73 additions and 0 deletions.
1 change: 1 addition & 0 deletions debian/arch/aarch64-linux-android
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
android-arm64
1 change: 1 addition & 0 deletions debian/arch/arm-linux-androideabi
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
android-arm
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
openssl-android (1.1.1d-1) stable; urgency=medium

* Initial Release.

-- Tobias Junghans <tobydox@veyon.io> Wed, 22 Jan 2020 15:09:42 +0100
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
11 changes: 11 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
Source: openssl-android
Section: devel
Priority: optional
Maintainer: Tobias Junghans <tobydox@veyon.io>
Build-Depends: debhelper (>= 9)
Standards-Version: 3.9.7

Package: openssl-android
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}
Description: OpenSSL library - Android runtime and headers
52 changes: 52 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
#!/usr/bin/make -f

# This has to be exported to make some magic below work.
export DH_OPTIONS

ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS)))
else
NUMJOBS = 1
endif

TARGETS := arm-linux-androideabi aarch64-linux-android
DESTDIR=$(CURDIR)/debian/openssl-android

export ANDROID_NDK_HOME=/opt/android/ndk
export PATH := $(ANDROID_NDK_HOME)/toolchains/llvm/prebuilt/linux-x86_64/bin/:$(PATH)

%:
dh $@ --parallel

override_dh_auto_clean:
for target in $(TARGETS); do \
rm -rf build-$$target; \
done
dh_auto_clean

override_dh_auto_configure:
for target in $(TARGETS); do \
OPENSSL_ARCH=$$(cat debian/arch/$$target); \
echo $(OPENSSL_ARCH); \
mkdir build-$$target; \
cd build-$$target; \
../openssl/Configure --cross-compile-prefix=$$target --prefix=/usr/$$target --openssldir=/usr/$$target $$OPENSSL_ARCH no-asm no-unit-test -mthumb -fPIC -latomic -D__ANDROID_API__=21; \
cd ..; \
done

override_dh_auto_build:
for target in $(TARGETS); do \
cd build-$$target; \
$(MAKE) SHLIB_VERSION_NUMBER= SHLIB_EXT=.so -j$(NUMJOBS); \
cd ..; \
done

override_dh_auto_install:
for target in $(TARGETS); do \
cd build-$$target; \
$(MAKE) SHLIB_VERSION_NUMBER= SHLIB_EXT=.so DESTDIR=$(DESTDIR) install; \
rm $(DESTDIR)/usr/$$target/lib/*.a; \
cd ..; \
done

override_dh_auto_test:
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1
1 change: 1 addition & 0 deletions debian/source/options
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
tar-ignore = .git

0 comments on commit 962ba08

Please sign in to comment.