summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Kamenskikh2016-11-18 12:04:24 +0500
committerAleksey Kamenskikh2016-11-18 12:04:24 +0500
commitbb7477679dd2104cd724b012a57eddfd0f6f72ac (patch)
treeffa947805f0687f4fe28d70bf10a937e425db47e
downloadaur-bb7477679dd2104cd724b012a57eddfd0f6f72ac.tar.gz
Initial version
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD24
-rw-r--r--msodbcsql-ubuntu.install11
3 files changed, 51 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..79336a66fce7
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = msodbcsql-ubuntu
+ pkgdesc = Microsoft SQL Server for Linux ODBC driver
+ pkgver = 13.0.1.0
+ pkgrel = 1
+ url = https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools
+ install = msodbcsql-ubuntu.install
+ arch = x86_64
+ license = unknown
+ depends = unixodbc
+ depends = libcurl-compat
+ noextract = msodbcsql_13.0.1.0-1_amd64.deb
+ source = https://packages.microsoft.com/ubuntu/16.04/prod/pool/main/m/msodbcsql/msodbcsql_13.0.1.0-1_amd64.deb
+ md5sums = 859fbdd932a50adde46362c59009e1cf
+
+pkgname = msodbcsql-ubuntu
+
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..2a360a27f0ab
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,24 @@
+# Maintainer: Aleksey Kamenskikh <aleksey.kamenskikh@gmail.com>
+_prodname=msodbcsql
+pkgname=${_prodname}-ubuntu
+pkgver=13.0.1.0
+_prodver=${pkgver}-1
+pkgrel=1
+pkgdesc="Microsoft SQL Server for Linux ODBC driver"
+arch=('x86_64')
+url="https://docs.microsoft.com/en-us/sql/linux/sql-server-linux-setup-tools"
+license=('unknown')
+depends=('unixodbc' 'libcurl-compat')
+source=("https://packages.microsoft.com/ubuntu/16.04/prod/pool/main/m/${_prodname}/${_prodname}_${_prodver}_amd64.deb")
+md5sums=('859fbdd932a50adde46362c59009e1cf')
+noextract=("${_prodname}_${_prodver}_amd64.deb")
+install=$pkgname.install
+
+package() {
+ cd "$pkgdir"
+ ar x ../../${_prodname}_${_prodver}_amd64.deb
+ tar xfJ data.tar.xz
+ rm control.tar.gz
+ rm data.tar.xz
+ rm debian-binary
+}
diff --git a/msodbcsql-ubuntu.install b/msodbcsql-ubuntu.install
new file mode 100644
index 000000000000..1bedbe1c24b2
--- /dev/null
+++ b/msodbcsql-ubuntu.install
@@ -0,0 +1,11 @@
+post_install()
+{
+ echo "Installing ODBC driver"
+ odbcinst -i -d -f /opt/microsoft/msodbcsql/etc/odbcinst.ini
+}
+
+post_remove()
+{
+ echo "Removing ODBC driver"
+ odbcinst -u -d -n "ODBC Driver 13 for SQL Server"
+}