OSDN Git Service

[add] : i686/alter-stable
[alterlinux/alterlinux-pkgbuilds.git] / alter-stable / i686 / pythonqt / PKGBUILD
1 # Maintainer: Alfredo Ramos <alfredo dot ramos at yandex dot com>
2 # Contributor: Chris <christopher.r.mullins g-mail>
3 # Contributor: Ainola
4 # Contributor: speps
5
6 pkgname=pythonqt
7 pkgver=3.2
8 pkgrel=6
9 pkgdesc='A dynamic Python binding for Qt applications'
10 arch=('i686' 'x86_64')
11 url='http://pythonqt.sourceforge.net/'
12 license=('LGPL2.1')
13
14 depends=('python' 'qt5-multimedia' 'qt5-svg' 'qt5-webkit' 'qt5-declarative' 'qt5-xmlpatterns')
15 makedepends=('git' 'qt5-tools')
16 conflicts=("${pkgname}-svn" "${pkgname}-for-screencloud" 'qt5-python27-git')
17 replaces=("${pkgname}-qt5")
18
19 source=(
20         "http://downloads.sourceforge.net/project/${pkgname}/${pkgname}/PythonQt-${pkgver}/PythonQt${pkgver}.zip"
21         'fix_python_version.patch'
22         'pkgconfig_file.prf'
23         'create_pkgconfig_file.patch'
24         'faster_build.patch'
25 )
26 sha512sums=(
27         '1ee0f50f5035568b38e945108f5496ba64355c6357c1ea8dfc17ad90fa360540769f94e0b3e0e398176e8a21c8afe139607f0b5a2e82c63f1cbd40201a25e0f0'
28         '9747898842f60bdfc5c38a54f7516a46b46279c57cbfa6c7f4796aa1ca5771ebb121f07fe4d09d23c60c92530750ee265808484f3e07aaae72065ed51c3896c7'
29         'a146b46d4fb7162dc4290c662971742a4f85e11b2f5f9d71b4cd52f500ed7f0c3c1cf9034ead2e91f3c4e133446838fa530b3e13d3618617c695f2a433fdbb23'
30         '9386ec26b3a59de492a9d8c31ca6c4f9e220510070a6d5c0a063618e3f6e7c4db611b27f6b46c028b5613e70453db67c060533e6940d72ff9ea623d80c2f99f9'
31         '3c560169a0c10eeea21c3f6d078220caea70886d0203ef6dee1157afdd0bc1c7198cc65c6f5b2b5f4f61e416fa52330e75f282534402c8e00b2fe0829f17ce2a'
32 )
33
34 prepare() {
35         # Create build directory
36         mkdir -p "${srcdir}"/build
37         cd "${srcdir}"/build
38         cp -R ../PythonQt${pkgver}/* ./
39
40         # Fix python version
41         patch -Np1 < ../fix_python_version.patch
42
43         # Add qmake configuration file to generate
44         # PythonQt pkg-config file (*.pc)
45         cp ../pkgconfig_file.prf build/
46         patch -Np1 < ../create_pkgconfig_file.patch
47
48         # Do not build tests nor examples
49         patch -Np1 < ../faster_build.patch
50 }
51
52 build() {
53         # Building package
54         cd "${srcdir}"/build
55         qmake-qt5 \
56                 QMAKE_CFLAGS="${CFLAGS}" \
57                 QMAKE_CXXFLAGS="${CXXFLAGS}" \
58                 CONFIG+=release \
59                 CONFIG+=c++14
60         make
61 }
62
63 package() {
64         cd "${srcdir}"/build
65
66         # Includes
67         mkdir -p "${pkgdir}"/usr/include/PythonQt/{gui,extensions/PythonQt_QtAll}
68         cp ../PythonQt${pkgver}/src/*.h "${pkgdir}"/usr/include/PythonQt/
69         cp ../PythonQt${pkgver}/src/gui/*.h "${pkgdir}"/usr/include/PythonQt/gui/
70         cp ../PythonQt${pkgver}/extensions/PythonQt_QtAll/*.h "${pkgdir}"/usr/include/PythonQt/extensions/PythonQt_QtAll/
71
72         # Library
73         mkdir -p "${pkgdir}"/usr/lib
74         cp -a lib/*.so* "${pkgdir}"/usr/lib/
75
76         # pkg-config file
77         mkdir -p "${pkgdir}"/usr/share/
78         cp -R pkgconfig "${pkgdir}"/usr/share/
79 }