summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: b89084746b23304b12c90803bd86674ff31fd39a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
# Maintainer: Damien Flament <damien.flament at gmx dot com>
# Contributor: mickele <mimocciola at yahoo dot com>
# Contributor: Ilmari Repo <ilmari at gmail dot com> (librecad-svn PKGBUILD)
# Contributor: GazJ Gary James <garyjames82 at gmail  dot com> (CADuntu PKGBUILD)

_repository='LibreCAD'
pkgname=librecad-git
pkgver=2.2.0.rc1.r91.g8604f171
pkgrel=2
pkgdesc="A 2D CAD drawing tool based on the community edition of QCad."
arch=('x86_64')
url="https://librecad.org"
license=('GPL')

depends=('muparser' 'qt5-svg' 'boost' 'freetype2')
makedepends=('git')
provides=('librecad')
conflicts=('librecad')

source=("git+https://github.com/LibreCAD/$_repository.git")
md5sums=('SKIP')

function pkgver
{
    cd "$_repository"

    git describe --long --tags | sed 's/\([^-]*-g\)/r\1/;s/-/./g'
}

function build
{
    cd "$_repository"

    qmake -recursive librecad.pro \
        QMAKE_CPPFLAGS="$CPPFLAGS" \
        QMAKE_CFLAGS="$CFLAGS" \
        QMAKE_CXXFLAGS="$CXXFLAGS" \
        QMAKE_LDFLAGS="$LDFLAGS"

    make
}

function package
{
    cd "$_repository"

    install -m 644 -Dt "$pkgdir/usr/share/pixmaps" librecad/res/main/librecad.png
    install -m 644 -Dt "$pkgdir/usr/share/applications" desktop/librecad.desktop
    install -m 644 -Dt "$pkgdir/usr/share/man/man1" desktop/librecad.1

    cd unix

    install -Dt "$pkgdir/usr/bin" librecad ttf2lff

    install -Dd "$pkgdir/usr/share/librecad"
    cp --recursive -t "$pkgdir/usr/share/librecad" resources/*
}