Browse Source

Add packaging; Add Arch Linux build scripts

v0.0.1-alpha
Pekka Helenius 4 years ago
parent
commit
99a6b26d21
3 changed files with 61 additions and 3 deletions
  1. +4
    -3
      README.md
  2. +53
    -0
      packaging/linux/arch/PKGBUILD
  3. +4
    -0
      packaging/linux/arch/bookstore-tomcat.xml

+ 4
- 3
README.md View File

@ -11,9 +11,10 @@
## Repository structure
| **Type** | **Name** | **Description** |
|----------|-------------------------|---------------------|
| `Folder` | [bookstore](bookstore) | Main project folder |
| **Type** | **Name** | **Description** |
|----------|-------------------------|---------------------------|
| `Folder` | [bookstore](bookstore) | Main project folder |
| `Folder` | [packaging](packaging) | OS-specific build scripts |
### Recommendations


+ 53
- 0
packaging/linux/arch/PKGBUILD View File

@ -0,0 +1,53 @@
# Maintainer: Pekka Helenius <fincer89@hotmail.com>
pkgname=bookstore-project
packagetype=war
packagename=Bookstore.${packagetype}
tomcat_ver=9
java_ver=8
pkgver=7.2af07c8
pkgrel=1
pkgdesc='Bookstore Java server example project'
arch=('any')
url='https://github.com/Fincer/java-bookstore'
license=('GPL')
depends=(
"tomcat${tomcat_ver}"
"mariadb"
"java-runtime>=${java_ver}"
)
makedepends=('maven' 'git')
source=(
"$pkgname::git+${url}.git"
"bookstore-tomcat.xml"
)
sha256sums=('SKIP'
'6a115dc9132cd04f5b740575612d6aeb744db8620e8249776dad8222ca917cbf')
pkgver() {
cd $pkgname
if [[ $(git describe) ]]; then
git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
else
echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
fi
}
#prepare() {
# cd $pkgname
#}
build() {
cd $pkgname/bookstore
mvn package
}
package() {
cd $pkgname/bookstore
install -Dm0644 -t ${pkgdir}/opt/bookstore/ target/${packagename}
install -Dm0644 ../../bookstore-tomcat.xml ${pkgdir}/etc/tomcat${tomcat_ver}/Catalina/localhost/bookstore.xml
}

+ 4
- 0
packaging/linux/arch/bookstore-tomcat.xml View File

@ -0,0 +1,4 @@
<Context docBase="/opt/bookstore/Bookstore.war"
antiResourceLocking="false"
swallowOutput="true"
/>

Loading…
Cancel
Save