summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 5be9ddcd6dd9f02ff390dce8738e75a02ebdb112 (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
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
# Maintainer: willemw <willemw12@gmail.com>
# Contributor: Sebastian Voecking <voeck@web.de>

# NOTE: config.sh detects during the build which libraries (gtk, ...) are available

pkgbase=mp-5
#pkgname=(mp-5-gtk mp-5-nc mp-5-qt5)
pkgname=(mp-5-gtk mp-5-nc)
pkgver=5.61
pkgrel=1
arch=('x86_64')
url="https://triptico.com/software/mp.html"
license=('Unlicense')
#'mp_doccer' 'perl-grutatxt'
#makedepends=('gtk3' 'qt5-base')
makedepends=('gtk3')
options=(!makeflags)
#source=("$pkgbase-$pkgver.tar.gz::https://triptico.com/download/mp/mp-$pkgver.tar.gz")
source=("$pkgbase-$pkgver.tar.gz::https://triptico.com/download/mp-5.tar.gz")
sha256sums=('4840e1490a581974e916fc612268a772ed181b92517178a7d68ed4fb997f2624')

prepare() {
  # Patch hard-coded install paths
  #sed -i 's| /usr| $(PREFIX)|g' mp-$pkgver-dev/makefile.in
  sed -i 's| /usr| $(PREFIX)|g' mp-$pkgver/makefile.in

  # Copy source files for each package
  # Patch: move subfolders "mpdm" and "mpsl" one folder up
  #for dir in mp-5-gtk mp-5-nc mp-5-qt5; do
  for dir in mp-5-gtk mp-5-nc; do
    rm -rf "$dir"
    #cp -a mp-$pkgver-dev "$dir"
    cp -a mp-$pkgver "$dir"
    rm -rf "$dir/"{mpdm,mpsl}
  done
  #cp -a mp-$pkgver-dev/{mpdm,mpsl} .
  cp -a mp-$pkgver/{mpdm,mpsl} .
}

build() {
  set -x

  cd "$srcdir/mp-5-gtk"
  ./config.sh --prefix=/usr --without-curses --without-kde4 --without-qt
  make

  cd "$srcdir/mp-5-nc"
  ./config.sh --prefix=/usr --without-gtk --without-kde4 --without-qt
  make

  #cd "$srcdir/mp-5-qt5"
  #./config.sh --prefix=/usr --without-curses --without-gtk --without-kde4 --without-qt4
  #make
}

package_mp-5-gtk() {
  pkgdesc="Text editor for programmers (GTK front-end)"
  depends=('gtk3')
  _pkgname='mp-5'
  provides=($_pkgname)
  conflicts=($_pkgname)

  cd mp-5-gtk
  #install -Dm644 mp.png "$pkgdir/usr/share/pixmaps/mp.png"
  install -dm755 "$pkgdir"{/usr/bin,/usr/share/applications,/usr/share/icons/hicolor/48x48/apps}
  make DESTDIR="$pkgdir" install
}

package_mp-5-nc() {
  pkgdesc="Text editor for programmers (ncurses front-end)"
  _pkgname='mp-5'
  provides=($_pkgname)
  conflicts=($_pkgname)

  cd mp-5-nc
  #install -Dm644 mp.png "$pkgdir/usr/share/pixmaps/mp.png"
  install -dm755 "$pkgdir"{/usr/bin,/usr/share/applications,/usr/share/icons/hicolor/48x48/apps}
  make DESTDIR="$pkgdir" install
}

#package_mp-5-qt5() {
#  pkgdesc="Text editor for programmers (QT5 front-end)"
#  depends=('qt5-base')
#  _pkgname='mp-5'
#  provides=($_pkgname)
#  conflicts=($_pkgname)
#
#  cd mp-5-qt5
#  #install -Dm644 mp.png "$pkgdir/usr/share/pixmaps/mp.png"
#  install -dm755 "$pkgdir"{/usr/bin,/usr/share/applications,/usr/share/icons/hicolor/48x48/apps}
#  make DESTDIR="$pkgdir" install
#}