wok-undigest annotate qoauth/receipt @ rev 418

collectd-bind: fix compile_rules ?
author Pascal Bellard <pascal.bellard@slitaz.org>
date Wed Aug 31 14:55:34 2011 +0200 (2011-08-31)
parents da2e410ca36f
children 5676dc6897f6
rev   line source
ben@168 1 # SliTaz package receipt.
ben@168 2
ben@168 3 PACKAGE="qoauth"
ben@168 4 VERSION="1.0"
ben@168 5 CATEGORY="development"
ben@168 6 SHORT_DESC="OAuth support for Qt applications."
ben@168 7 MAINTAINER="ben@seawolfsanctuary.com"
ben@168 8 DEPENDS="glibc-locale libQtCore libQtGui libQtNetwork libQtSvg libQtXml \
ben@168 9 libQtDesigner libQtScript libQt3Support libQtClucene libQtDBus libQtHelp \
ben@168 10 libQtOpenGL libQtSql libQtWebkit"
pascal@406 11 BUILD_DEPENDS="qmake qca-dev xorg-libX11-dev dbus-dev Qt4-dev slitaz-toolchain"
ben@168 12 TARBALL="$PACKAGE-$VERSION-src.tar.bz2"
ben@168 13 WEB_SITE="http://github.com/ayoy/$PACKAGE"
ben@168 14 WGET_URL="http://files.ayoy.net/$PACKAGE/release/$VERSION/src/$TARBALL"
ben@168 15
ben@168 16 # Rules to configure and make the package.
ben@168 17 compile_rules()
ben@168 18 {
ben@168 19 # echo -n "Linking..."
ben@168 20 # ln -s $src-src $src
ben@168 21 # status
ben@168 22
ben@168 23 cd $src
ben@168 24
ben@168 25 qmake PREFIX="/usr"
ben@168 26 # chmod +x configure
ben@168 27 # ./configure \
ben@168 28 # --prefix=/usr
ben@168 29
ben@168 30 patch -u <<ENDOFPATCH
ben@168 31 --- Makefile
ben@168 32 +++ Makefile
ben@168 33 @@ -28,2 +28,1 @@
ben@168 34 - sub-src \\
ben@168 35 - sub-tests
ben@168 36 + sub-src
ben@168 37 ENDOFPATCH
ben@168 38
ben@168 39 status
ben@168 40
ben@168 41 patch -u <<ENDOFPATCH
ben@168 42 --- Makefile
ben@168 43 +++ Makefile
ben@168 44 @@ -24,8 +24,7 @@
ben@168 45 MOVE = mv -f
ben@168 46 CHK_DIR_EXISTS= test -d
ben@168 47 MKDIR = mkdir -p
ben@168 48 -SUBTARGETS = \\
ben@168 49 - sub-src
ben@168 50 +SUBTARGETS = sub-src
ben@168 51
ben@168 52 src/\$(MAKEFILE):
ben@168 53 @\$(CHK_DIR_EXISTS) src/ || \$(MKDIR) src/
ben@168 54 @@ -140,16 +139,16 @@
ben@168 55 qmake: qmake_all FORCE
ben@168 56 @\$(QMAKE) -unix PREFIX=/usr -o Makefile qoauth.pro
ben@168 57
ben@168 58 -qmake_all: sub-src-qmake_all sub-tests-qmake_all FORCE
ben@168 59 +qmake_all: sub-src-qmake_all FORCE
ben@168 60
ben@168 61 -make_default: sub-src-make_default-ordered sub-tests-make_default-ordered FORCE
ben@168 62 -make_first: sub-src-make_first-ordered sub-tests-make_first-ordered FORCE
ben@168 63 -all: sub-src-all-ordered sub-tests-all-ordered FORCE
ben@168 64 -clean: sub-src-clean-ordered sub-tests-clean-ordered FORCE
ben@168 65 -distclean: sub-src-distclean-ordered sub-tests-distclean-ordered FORCE
ben@168 66 +make_default: sub-src-make_default-ordered FORCE
ben@168 67 +make_first: sub-src-make_first-ordered FORCE
ben@168 68 +all: sub-src-all-ordered FORCE
ben@168 69 +clean: sub-src-clean-ordered FORCE
ben@168 70 +distclean: sub-src-distclean-ordered FORCE
ben@168 71 -\$(DEL_FILE) Makefile
ben@168 72 -install_subtargets: sub-src-install_subtargets-ordered sub-tests-install_subtargets-ordered FORCE
ben@168 73 -uninstall_subtargets: sub-src-uninstall_subtargets-ordered sub-tests-uninstall_subtargets-ordered FORCE
ben@168 74 +install_subtargets: sub-src-install_subtargets-ordered FORCE
ben@168 75 +uninstall_subtargets: sub-src-uninstall_subtargets-ordered FORCE
ben@168 76
ben@168 77 check: sub-tests
ben@168 78 ( cd tests/ut_interface && ./ut_interface ) && ( cd tests/ft_interface && ./ft_interface )
ben@168 79 ENDOFPATCH
ben@168 80
ben@168 81 status
ben@168 82
ben@168 83 if [ -f /usr/include/QtOAuth ] || [ -d /usr/include/QtOAuth ] ; then
ben@168 84 echo -n "Removing QtOAuth placeholder... "
ben@168 85 rm -rf /usr/include/QtOAuth/
ben@168 86 status && echo
ben@168 87 fi
ben@168 88
ben@168 89 make -j4 && make DESTDIR=$_pkg install
ben@168 90 }
ben@168 91
ben@168 92 # Rules to gen a SliTaz package suitable for Tazpkg.
ben@168 93 genpkg_rules()
ben@168 94 {
ben@168 95 mkdir -p $fs/usr
ben@168 96 for DIRECTORY in lib include ; do
ben@168 97 cp -a $src/$DIRECTORY $fs/usr
ben@168 98 done
pascal@417 99 cp $src/src/interface.h $fs/usr/include
ben@168 100
ben@168 101 mv $fs/usr/include/QtOAuth $fs/usr/include/QtOAuth.bak
ben@168 102 mkdir $fs/usr/include/QtOAuth/
ben@168 103 mv $fs/usr/include/interface.h $fs/usr/include/QtOAuth/interface.h
ben@168 104 cp $fs/usr/include/QtOAuth/interface.h $fs/usr/include/interface.h
ben@168 105 mv $fs/usr/include/QtOAuth.bak $fs/usr/include/QtOAuth/QtOAuth
ben@168 106
ben@168 107 mkdir -p $fs/usr/share/qt/mkspecs/features && \
ben@168 108 cp $src/oauth.prf $fs/usr/share/qt/mkspecs/features/oauth.prf
ben@168 109
ben@168 110 # Copy .desktop file:
ben@168 111 # cp -a $WOK/$PACKAGE/stuff/* $fs/usr
ben@168 112 }
ben@168 113
ben@168 114 pre_install()
ben@168 115 {
ben@168 116 if [ -f /usr/include/QtOAuth ] || [ -d /usr/include/QtOAuth ] ; then
ben@168 117 echo -n "Removing QtOAuth placeholder... "
ben@168 118 rm -rf /usr/include/QtOAuth/
ben@168 119 status && echo
ben@168 120 fi
ben@168 121 }