summaryrefslogtreecommitdiffstats
path: root/src/qtsparkle_qt4.mk
blob: bf5d2eb9e8965bbc65f77f9ee8a07a1845eeb3eb (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
# This file is part of MXE. See LICENSE.md for licensing information.

PKG             := qtsparkle_qt4
$(PKG)_WEBSITE  := https://github.com/davidsansome/qtsparkle
$(PKG)_DESCR    := qtsparkle
$(PKG)_IGNORE   :=
$(PKG)_VERSION  := 8882e6ef86cdb79db7932307309d005411fd0c20
$(PKG)_CHECKSUM := 86f6f010356e05e6efb956b5643ce587ffbbae45e8e7dc1b25b4b1dcf865b5f3
$(PKG)_SUBDIR   := qtsparkle-$($(PKG)_VERSION)
$(PKG)_FILE     := $(PKG)-$($(PKG)_VERSION).tar.gz
$(PKG)_URL      := https://github.com/davidsansome/qtsparkle/archive/$($(PKG)_VERSION).tar.gz
$(PKG)_DEPS     := gcc qt

define $(PKG)_UPDATE
    $(call MXE_GET_GITHUB_TAGS, davidsansome/qtsparkle)
endef

define $(PKG)_BUILD
    mkdir '$(1).build'
    cd '$(1).build' && '$(TARGET)-cmake' '$(1)'
    $(MAKE) -C '$(1).build' -j '$(JOBS)'
    $(MAKE) -C '$(1).build' -j 1 install

    # create pkg-config file
    $(INSTALL) -d '$(PREFIX)/$(TARGET)/lib/pkgconfig'
    (echo 'prefix=$(PREFIX)/$(TARGET)'; \
     echo 'exec_prefix=$${prefix}'; \
     echo 'libdir=$${exec_prefix}/lib'; \
     echo 'includedir=$${prefix}/include'; \
     echo ''; \
     echo 'Name: $(PKG)'; \
     echo 'Version: '; \
     echo 'Description: $(PKG)'; \
     echo 'Requires: QtCore QtGui QtNetwork QtXml'; \
     echo 'Libs: -L$${libdir} -lqtsparkle'; \
     echo 'Cflags: -I$${includedir}';) \
     > '$(PREFIX)/$(TARGET)/lib/pkgconfig/$(PKG).pc'

    $(TARGET)-g++ \
        -W -Wall -Werror -ansi -pedantic \
        '$(TEST_FILE)' -o '$(PREFIX)/$(TARGET)/bin/test-$(PKG).exe' \
        `$(TARGET)-pkg-config $(PKG) --cflags --libs`
endef