summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorRiccardo Sacchetto2022-03-20 19:57:46 +0100
committerRiccardo Sacchetto2022-03-20 19:57:46 +0100
commit7f2977ddf58dc4f4e6f3c6ff2bef406bcd2e77d9 (patch)
tree235f2b4779347d9df4f6f0febf402be2356dea1c
downloadaur-7f2977ddf58dc4f4e6f3c6ff2bef406bcd2e77d9.tar.gz
First packaged version - v0.6.0
-rw-r--r--.SRCINFO16
-rw-r--r--PKGBUILD38
2 files changed, 54 insertions, 0 deletions
diff --git a/.SRCINFO b/.SRCINFO
new file mode 100644
index 000000000000..71dcf81d45f2
--- /dev/null
+++ b/.SRCINFO
@@ -0,0 +1,16 @@
+pkgbase = sea-orm-cli
+ pkgdesc = CLI for the Sea-Orm crate
+ pkgver = 0.6.0
+ pkgrel = 1
+ url = https://www.sea-ql.org/seaorm/
+ arch = x86_64
+ license = MIT
+ license = Apache
+ makedepends = cargo
+ depends = sqlite
+ depends = postgresql-libs
+ depends = libmariadbclient
+ source = https://github.com/SeaQL/sea-orm/archive/refs/tags/0.6.0.tar.gz
+ sha512sums = ed37796d3a1ca3bb4c6d214aa939e8e5747071ff431cc2c84f38d70259281ca5c073f5671b051a7c3a2199bf4bb49b31c435e59f2cf4bd31a687e3bfa2a5d0a5
+
+pkgname = sea-orm-cli
diff --git a/PKGBUILD b/PKGBUILD
new file mode 100644
index 000000000000..38283bed8ec7
--- /dev/null
+++ b/PKGBUILD
@@ -0,0 +1,38 @@
+# Maintainer: Riccardo Sacchetto <rsacchetto@nexxontech.it>
+pkgname=sea-orm-cli
+pkgver=0.6.0
+pkgrel=1
+pkgdesc="CLI for the Sea-Orm crate"
+arch=('x86_64')
+url="https://www.sea-ql.org/seaorm/"
+license=('MIT' 'Apache')
+depends=('sqlite' 'postgresql-libs' 'libmariadbclient')
+makedepends=('cargo')
+source=("https://github.com/SeaQL/sea-orm/archive/refs/tags/${pkgver}.tar.gz")
+sha512sums=('ed37796d3a1ca3bb4c6d214aa939e8e5747071ff431cc2c84f38d70259281ca5c073f5671b051a7c3a2199bf4bb49b31c435e59f2cf4bd31a687e3bfa2a5d0a5')
+
+prepare() {
+ # Enter the sea-orm-cli source folder downloaded from GitHub
+ cd "sea-orm-${pkgver}/sea-orm-cli"
+ # A specific sea-orm-cli release requires the matching sea-schema version: update Cargo.toml to avoid errors
+ sed -i 's/git = "https:\/\/github.com\/SeaQL\/sea-schema.git"/git = "https:\/\/github.com\/SeaQL\/sea-schema.git", tag = "0.5.0"/' Cargo.toml
+ # Fetch the dependencies
+ cargo fetch --target "$CARCH-unknown-linux-gnu"
+}
+
+build() {
+ # Enter the sea-orm-cli source folder downloaded from GitHub
+ cd "sea-orm-${pkgver}/sea-orm-cli"
+ # Build the binary with the "Release" profile (enables all the optimizations)
+ cargo build --release
+}
+
+package() {
+ # Enter the sea-orm source folder downloaded from GitHub
+ cd "sea-orm-${pkgver}"
+ # Install the compiled CLI tool
+ install -Dm755 "sea-orm-cli/target/release/sea-orm-cli" "${pkgdir}/usr/bin/sea-orm-cli"
+ # Install the license files
+ install -Dm644 LICENSE-MIT -t "${pkgdir}/usr/share/licenses/${pkgname}"
+ install -Dm644 LICENSE-APACHE -t "${pkgdir}/usr/share/licenses/${pkgname}"
+}