summarylogtreecommitdiffstats
path: root/PKGBUILD
blob: 38e2d4ebd7110d70f4714348b94dc1358bd28997 (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
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# Contributor: Patrick Kelly <kameo76890 at gmail dot com>
# Contributor: Georgios  Tsalikis <aliverius somewhere near tsalikis and a net>
# Contributor: Rod Kay <charlie5 on #ada at freenode.net>

pkgname=xmlada
pkgver=2016
pkgrel=2
pkgdesc="A full XML suite for Ada"

arch=('i686' 'x86_64')
url="http://libre.adacore.com/libre/tools/xmlada/"
license=('GPL')

depends=("gcc-ada")

source=(http://mirrors.cdn.adacore.com/art/57399978c7a447658e0affc0
        patch-aclocal.m4
        patch-Makefile.in)

sha1sums=('a9c840d9d05ed865aa7c960d9f27cf7cd93e12b9'
          '20fa4ccacd2cebd2b0b349dc11371730a50a0fd2'
          '33ac945685c79befd86c3c4f6093202a5e7b209a')



prepare()
{
  cd $srcdir/$pkgname-gpl-$pkgver-src
	
  patch -p0 -i ../patch-aclocal.m4
  patch -p0 -i ../patch-Makefile.in

}



build()
{
  cd $srcdir/$pkgname-gpl-$pkgver-src

  autoconf
  ./configure --prefix=/usr
  make static relocatable


  rm -fr lib
  mkdir -p lib/xmlada/xmlada_dom.relocatable

  cp ./dom/lib/relocatable/libxmlada_dom.so                          lib/xmlada/xmlada_dom.relocatable
  cp ./dom/lib/relocatable/libxmlada_dom.so.2016                     lib/xmlada/xmlada_dom.relocatable
  cp ./input_sources/lib/relocatable/libxmlada_input_sources.so      lib/xmlada/xmlada_input.relocatable
  cp ./input_sources/lib/relocatable/libxmlada_input_sources.so.2016 lib/xmlada/xmlada_input.relocatable
  cp ./sax/lib/relocatable/libxmlada_sax.so                          lib/xmlada/xmlada_sax.relocatable
  cp ./sax/lib/relocatable/libxmlada_sax.so.2016                     lib/xmlada/xmlada_sax.relocatable
  cp ./schema/lib/relocatable/libxmlada_schema.so                    lib/xmlada/xmlada_schema.relocatable
  cp ./schema/lib/relocatable/libxmlada_schema.so.2016               lib/xmlada/xmlada_schema.relocatable
  cp ./unicode/lib/relocatable/libxmlada_unicode.so                  lib/xmlada/xmlada_unicode.relocatable
  cp ./unicode/lib/relocatable/libxmlada_unicode.so.2016             lib/xmlada/xmlada_unicode.relocatable

  ln -s xmlada/xmlada_dom.relocatable/libxmlada_dom.so.2016               lib/libxmlada_dom.so.2016
  ln -s xmlada/xmlada_input.relocatable/libxmlada_input_sources.so.2016   lib/libxmlada_input_sources.so.2016
  ln -s xmlada/xmlada_sax.relocatable/libxmlada_sax.so.2016               lib/libxmlada_sax.so.2016
  ln -s xmlada/xmlada_schema.relocatable/libxmlada_schema.so.2016         lib/libxmlada_schema.so.2016
  ln -s xmlada/xmlada_unicode.relocatable/libxmlada_unicode.so.2016       lib/libxmlada_unicode.so.2016
}



INSTALL_DATA=install
INSTALL_SCRIPT=install

package() 
{
  cd $srcdir/$pkgname-gpl-$pkgver-src

  STAGEDIR=$pkgdir
  PREFIX=/usr
  WRKSRC=$srcdir/$pkgname-gpl-$pkgver-src


	mkdir -p \
        ${STAGEDIR}${PREFIX}/bin \
        ${STAGEDIR}${PREFIX}/include/xmlada \
		${STAGEDIR}${PREFIX}/lib/gnat \
		${STAGEDIR}${PREFIX}/share/gps/plug-ins \
        ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_dom.relocatable \
        ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_input.relocatable \
        ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_sax.relocatable \
        ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_schema.relocatable \
        ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_unicode.relocatable \
        ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_dom.static \
        ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_input.static \
        ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_sax.static \
        ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_schema.static \
        ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_unicode.static \
        ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_dom.relocatable \
        ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_input.relocatable \
        ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_sax.relocatable \
        ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_schema.relocatable \
        ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_unicode.relocatable \
        ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_dom.static \
        ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_input.static \
        ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_sax.static \
        ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_schema.static \
        ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_unicode.static

#		${STAGEDIR}${DOCSDIR}


	${INSTALL_DATA} ${WRKSRC}/dom/*.ad[bs]           ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_dom.relocatable
	${INSTALL_DATA} ${WRKSRC}/input_sources/*.ad[bs] ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_input.relocatable
	${INSTALL_DATA} ${WRKSRC}/sax/*.ad[bs]           ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_sax.relocatable
	${INSTALL_DATA} ${WRKSRC}/schema/*.ad[bs]        ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_schema.relocatable
	${INSTALL_DATA} ${WRKSRC}/unicode/*.ad[bs]       ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_unicode.relocatable

	${INSTALL_DATA} ${WRKSRC}/dom/*.ad[bs]           ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_dom.static
	${INSTALL_DATA} ${WRKSRC}/input_sources/*.ad[bs] ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_input.static
	${INSTALL_DATA} ${WRKSRC}/sax/*.ad[bs]           ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_sax.static
	${INSTALL_DATA} ${WRKSRC}/schema/*.ad[bs]        ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_schema.static
	${INSTALL_DATA} ${WRKSRC}/unicode/*.ad[bs]       ${STAGEDIR}${PREFIX}/include/xmlada/xmlada_unicode.static

	${INSTALL_DATA} ${WRKSRC}/dom/lib/relocatable/*           ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_dom.relocatable
	${INSTALL_DATA} ${WRKSRC}/input_sources/lib/relocatable/* ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_input.relocatable
	${INSTALL_DATA} ${WRKSRC}/sax/lib/relocatable/*           ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_sax.relocatable
	${INSTALL_DATA} ${WRKSRC}/schema/lib/relocatable/*        ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_schema.relocatable
	${INSTALL_DATA} ${WRKSRC}/unicode/lib/relocatable/*       ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_unicode.relocatable

	${INSTALL_DATA} ${WRKSRC}/dom/lib/static/*           ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_dom.static
	${INSTALL_DATA} ${WRKSRC}/input_sources/lib/static/* ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_input.static
	${INSTALL_DATA} ${WRKSRC}/sax/lib/static/*           ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_sax.static
	${INSTALL_DATA} ${WRKSRC}/schema/lib/static/*        ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_schema.static
	${INSTALL_DATA} ${WRKSRC}/unicode/lib/static/*       ${STAGEDIR}${PREFIX}/lib/xmlada/xmlada_unicode.static


	${INSTALL_DATA}                \
        ${WRKSRC}/distrib/xml*.gpr \
        ${WRKSRC}/dom/xml*.gpr \
        ${WRKSRC}/input_sources/xml*.gpr \
        ${WRKSRC}/sax/xml*.gpr \
        ${WRKSRC}/schema/xml*.gpr \
        ${WRKSRC}/unicode/xml*.gpr \
		${STAGEDIR}${PREFIX}/lib/gnat


    mv lib/libxmlada_dom.so.2016           ${STAGEDIR}${PREFIX}/lib
    mv lib/libxmlada_input_sources.so.2016 ${STAGEDIR}${PREFIX}/lib
    mv lib/libxmlada_sax.so.2016           ${STAGEDIR}${PREFIX}/lib
    mv lib/libxmlada_schema.so.2016        ${STAGEDIR}${PREFIX}/lib
    mv lib/libxmlada_unicode.so.2016       ${STAGEDIR}${PREFIX}/lib
}