Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions build-tools/debian-metadata/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7
31 changes: 31 additions & 0 deletions build-tools/debian-metadata/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
Source: oss-xamarin.android
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shouldn't this be Source: xamarin.android?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No, the Source: line relates to the name of the source package, which is based on the compressed archive name, which is still oss-xamarin.android_versionnumberstuff

Section: unknown
Priority: optional
Maintainer: Xamarin <[email protected]>
Build-Depends: debhelper (>=9)
Standards-Version: 3.9.6
Homepage: https://www.xamarin.com/platform
Vcs-Git: https://github.com/xamarin/xamarin-android.git
Vcs-Browser: https://github.com/xamarin/xamarin-android

Package: xamarin.android
Architecture: amd64
Depends: mono-xbuild (>= 5.2), java8-sdk, ${misc:Depends}, ${shlibs:Depends}
Description: Xamarin.Android libraries and runtime (host component)
The best way to build native Android apps.
.
* Ship native Android packages. Xamarin.Android uses just-in-time
compilation for sophisticated runtime optimization of your app’s
performance, meaning your app is a native Android APK.
* Access any Android API, including new form factors. We bring 100% of
Google’s Android APIs to C#, enhancing Java APIs with async support
and .NET naming conventions so you feel right at home.
* Call existing Java code from C#. Use your existing Java code,
frameworks, and custom controls in your Xamarin app using our
automatic binding generator.
* Build Android Wear apps. With access to 100% API support for Android
Wear, create full-featured applications capable of running on Android
Wear devices.
* Stay up-to-date with Android. Xamarin stays up-to-date with the most
current APIs from Google, so you can always use the latest features
in your apps.
12 changes: 12 additions & 0 deletions build-tools/debian-metadata/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/make -f

build:
build-arch:
build-indep:
override_dh_strip:
override_dh_strip_nondeterminism:
override_dh_shlibdeps:
echo "noop"

%:
dh $@
1 change: 1 addition & 0 deletions build-tools/debian-metadata/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
1 change: 1 addition & 0 deletions build-tools/debian-metadata/xamarin.android.install.in
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
bin/%CONFIG%/lib/xamarin.android /usr/lib/
2 changes: 2 additions & 0 deletions build-tools/debian-metadata/xamarin.android.links
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/usr/lib/xamarin.android/xbuild-frameworks/MonoAndroid /usr/lib/mono/xbuild-frameworks/MonoAndroid
/usr/lib/xamarin.android/xbuild/Xamarin /usr/lib/mono/xbuild/Xamarin
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is viable now, but potentially problematic if we ever get another Xamarin system on Linux.

Though at present I doubt iOS or Mac will exist on Linux, so this probably isn't something to worry about...

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can change it now, if you prefer? Or we wait until it becomes a problem

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We can wait until it's a problem.

26 changes: 23 additions & 3 deletions build-tools/scripts/BuildEverything.mk
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,14 @@ GIT_COMMIT = $(shell LANG=C git log --no-color --first-parent -n1 --prett
# "0" when commit hash is invalid (e.g. 00000000)
-num-commits-since-version-change = $(shell LANG=C git log $(-commit-of-last-version-change)..HEAD --oneline 2>/dev/null | wc -l | sed 's/ //g')

ifeq ($(OS),Linux)
ZIP_EXTENSION = tar.bz2
else
ZIP_EXTENSION = zip
endif

ZIP_OUTPUT_BASENAME = oss-xamarin.android_v$(PRODUCT_VERSION).$(-num-commits-since-version-change)_$(OS)-$(OS_ARCH)_$(GIT_BRANCH)_$(GIT_COMMIT)
ZIP_OUTPUT = $(ZIP_OUTPUT_BASENAME).zip
ZIP_OUTPUT = $(ZIP_OUTPUT_BASENAME).$(ZIP_EXTENSION)


## The following values *must* use SPACE, **not** TAB, to separate values.
Expand Down Expand Up @@ -164,8 +170,22 @@ package-oss $(ZIP_OUTPUT):
for f in `cat $$_sl` ; do \
echo "$(ZIP_OUTPUT_BASENAME)/bin/$$c/lib/xamarin.android/xbuild/$$f" >> "$$_exclude_list"; \
done; \
done; \
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change will break the zip -r command, as without the continuation $$_exclude_list won't be defined, preventing zip -r ... -x@$$_exclude_list from working.

The zip will thus need to be updated to instead use -x@.__exclude_list.txt.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done.

done
ifeq ($(ZIP_EXTENSION),zip)
zip -r "$(ZIP_OUTPUT)" \
`ls -1d $(_BUNDLE_ZIPS_INCLUDE) 2>/dev/null` \
"-x@$$_exclude_list"
"-x@.__exclude_list.txt"
else ifeq ($(ZIP_EXTENSION),tar.bz2)
tar --exclude-from=.__exclude_list.txt -cjhvf "$(ZIP_OUTPUT)" `ls -1d $(_BUNDLE_ZIPS_INCLUDE) 2>/dev/null`
endif
-rm ".__exclude_list.txt"

package-deb: $(ZIP_OUTPUT)
rm -fr $(ZIP_OUTPUT_BASENAME)
tar xf $(ZIP_OUTPUT)
cp -a build-tools/debian-metadata $(ZIP_OUTPUT_BASENAME)/debian
sed "s/%CONFIG%/$(CONFIGURATION)/" $(ZIP_OUTPUT_BASENAME)/debian/xamarin.android.install.in > $(ZIP_OUTPUT_BASENAME)/debian/xamarin.android.install && rm -f $(ZIP_OUTPUT_BASENAME)/debian/xamarin.android.install.in
cp LICENSE $(ZIP_OUTPUT_BASENAME)/debian/copyright
ln -sf $(ZIP_OUTPUT) oss-xamarin.android_$(PRODUCT_VERSION).$(-num-commits-since-version-change).orig.tar.bz2
cd $(ZIP_OUTPUT_BASENAME) && DEBEMAIL="Xamarin Public Jenkins (auto-signing) <[email protected]>" dch --create -v $(PRODUCT_VERSION).$(-num-commits-since-version-change) --package oss-xamarin.android --force-distribution --distribution alpha "New release - please see git log for $(GIT_COMMIT)"
cd $(ZIP_OUTPUT_BASENAME) && dpkg-buildpackage -us -uc -rfakeroot
2 changes: 2 additions & 0 deletions build-tools/scripts/dependencies/linux-prepare-Ubuntu.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ if [ "$OS_ARCH" = "x86_64" ]; then
UBUNTU_DEPS="$UBUNTU_DEPS
lib32stdc++6
lib32z1
gcc-multilib
g++-multilib
libx32tinfo-dev
linux-libc-dev:i386
zlib1g-dev:i386
Expand Down