build library in addition to binary, add version autobump, add license, add missing readline dependency

This commit is contained in:
Fabian Posch 2024-06-06 13:19:16 +02:00
parent 12ee9eb9e3
commit 773c9b91f6
3 changed files with 67 additions and 24 deletions

View file

@ -1,18 +1,21 @@
pkgbase = abc-git pkgbase = abc-git
pkgdesc = System for Sequential Logic Synthesis and Formal Verification pkgdesc = System for Sequential Logic Synthesis and Formal Verification
pkgver = 1.01 pkgver = 1.02.r5444.806a996
pkgrel = 1 pkgrel = 1
url = http://www.eecs.berkeley.edu/~alanmi/abc/abc.htm url = https://people.eecs.berkeley.edu/~alanmi/abc/
arch = x86_64 arch = x86_64
arch = i686 arch = i686
license = BSD license = BSD
makedepends = git makedepends = git
makedepends = make makedepends = make
makedepends = gcc makedepends = gcc
depends = readline
provides = abc provides = abc
provides = libabc.so
conflicts = abc conflicts = abc
source = git+https://github.com/berkeley-abc/abc.git source = git+https://github.com/berkeley-abc/abc.git
md5sums = SKIP source = LICENSE
sha512sums = SKIP
sha512sums = 3b34a70f67f52df1aa933ee517babf9105d65adb9d53c475b5ea02e361c6a983e6611d81772350c25653920dbc27d37c90a1cf70cbd52859c5a12e06fbeb1563
pkgname = abc-git pkgname = abc-git

22
LICENSE Normal file
View file

@ -0,0 +1,22 @@
ABC: System for Sequential Synthesis and Verification
http://www.eecs.berkeley.edu/~alanmi/abc/
Copyright (c) The Regents of the University of California. All rights reserved.
Permission is hereby granted, without written agreement and without license or
royalty fees, to use, copy, modify, and distribute this software and its
documentation for any purpose, provided that the above copyright notice and
the following two paragraphs appear in all copies of this software.
IN NO EVENT SHALL THE UNIVERSITY OF CALIFORNIA BE LIABLE TO ANY PARTY FOR
DIRECT, INDIRECT, SPECIAL, INCIDENTAL, OR CONSEQUENTIAL DAMAGES ARISING OUT OF
THE USE OF THIS SOFTWARE AND ITS DOCUMENTATION, EVEN IF THE UNIVERSITY OF
CALIFORNIA HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
THE UNIVERSITY OF CALIFORNIA SPECIFICALLY DISCLAIMS ANY WARRANTIES, INCLUDING,
BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
A PARTICULAR PURPOSE. THE SOFTWARE PROVIDED HEREUNDER IS ON AN "AS IS" BASIS,
AND THE UNIVERSITY OF CALIFORNIA HAS NO OBLIGATION TO PROVIDE MAINTENANCE,
SUPPORT, UPDATES, ENHANCEMENTS, OR MODIFICATIONS.

View file

@ -1,37 +1,55 @@
# Maintainer: Brent Carmer <bcarmer@gmail.com> # Maintainer: Fabian Posch <aur@posch.tech>
# Contributor: Brent Carmer <bcarmer@gmail.com>
_pkgname=abc _pkgname=abc
pkgname=$_pkgname-git pkgname=${_pkgname}-git
_basever=1
pkgver=1.01 _patchlvl=02
# pkgver() { _gitversion=r5444.806a996
# cd "$_pkgname" pkgver=${_basever}.${_patchlvl}.${_gitversion}
# git describe --long --tags | sed -r 's/([^-]*-g)/r\1/;s/-/./g'
# }
pkgrel=1 pkgrel=1
pkgdesc="System for Sequential Logic Synthesis and Formal Verification" pkgdesc="System for Sequential Logic Synthesis and Formal Verification"
url="http://www.eecs.berkeley.edu/~alanmi/abc/abc.htm" url="https://people.eecs.berkeley.edu/~alanmi/abc/"
arch=('x86_64' 'i686') arch=('x86_64' 'i686')
license=('BSD') license=('BSD')
depends=() depends=('readline')
makedepends=('git' 'make' 'gcc') makedepends=('git' 'make' 'gcc')
optdepends=() optdepends=()
conflicts=() conflicts=()
replaces=() replaces=()
backup=() backup=()
conflicts=('abc') conflicts=("${_pkgname}")
provides=('abc') provides=("${_pkgname}" "lib${_pkgname}.so")
md5sums=('SKIP')
source=('git+https://github.com/berkeley-abc/abc.git') source=(
"git+https://github.com/berkeley-abc/abc.git"
"LICENSE"
)
sha512sums=(
"SKIP"
"3b34a70f67f52df1aa933ee517babf9105d65adb9d53c475b5ea02e361c6a983e6611d81772350c25653920dbc27d37c90a1cf70cbd52859c5a12e06fbeb1563"
)
pkgver() {
cd ${_pkgname}
printf "r%s.%s" "$(git rev-list --count HEAD)" "$(git rev-parse --short=7 HEAD)"
}
build() { build() {
cd $srcdir/$_pkgname cd ${_pkgname}
make -j
# we build abc with PIC enabled, so we don't have to compile it multiple times
# for the different targets
make ABC_USE_PIC=1 abc libabc.so -j$(NPROC)
} }
package() { package() {
mkdir -p $pkgdir/usr/bin # install the license
cd $srcdir/$_pkgname install -Dm644 "${srcdir}/LICENSE" "${pkgdir}/usr/share/licenses/${pkgname}/LICENSE"
cp abc $pkgdir/usr/bin
# install the binary
install -Dm755 "${srcdir}/${_pkgname}/abc" "${pkgdir}/usr/bin/${_pkgname}"
# install the library
install -Dm755 "${srcdir}/${_pkgname}/libabc.so" "${pkgdir}/usr/lib/lib${_pkgname}.so"
} }