Skip to content

Commit

Permalink
deb: generate install list by qmake to fit variant environments
Browse files Browse the repository at this point in the history
  • Loading branch information
wang-bin committed Sep 25, 2014
1 parent e636b6a commit e4772f2
Show file tree
Hide file tree
Showing 11 changed files with 55 additions and 87 deletions.
2 changes: 1 addition & 1 deletion debian/control
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ Package: qtav-dev
Architecture: any
Multi-Arch: same
Section: libdevel
Depends: ${misc:Depends}, libqt5opengl5-dev
Depends: ${misc:Depends}, libqtav, libqt5opengl5-dev
Description: QtAV development files
QtAV is a multimedia playback library based on Qt and FFmpeg.
It can help you to write a player with less effort than ever before.
Expand Down
1 change: 0 additions & 1 deletion debian/libqtav.install

This file was deleted.

4 changes: 0 additions & 4 deletions debian/qml-module-qtav.install

This file was deleted.

52 changes: 0 additions & 52 deletions debian/qtav-dev.install

This file was deleted.

8 changes: 0 additions & 8 deletions debian/qtav-players.install

This file was deleted.

20 changes: 0 additions & 20 deletions debian/qtav-private-dev.install

This file was deleted.

2 changes: 1 addition & 1 deletion debian/rules
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
DEB_BUILD_MULTIARCH ?= $(shell dpkg-architecture -qDEB_BUILD_MULTIARCH)

%:
dh $@
dh $@ --parallel

override_dh_auto_configure:
qmake
Expand Down
17 changes: 17 additions & 0 deletions examples/player/player.pro
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,23 @@ HEADERS += \
config/AVFilterConfigPage.h \
filters/AVFilterSubtitle.h


unix:!android:!mac {
#debian
player_bins = libcommon.so.* player QMLPlayer
DEB_INSTALL_LIST = $$join(player_bins, \\n.$$[QT_INSTALL_BINS]/, .$$[QT_INSTALL_BINS]/)
DEB_INSTALL_LIST *= \
usr/bin/player \
usr/bin/QMLPlayer \
usr/share/applications/player.desktop \
usr/share/applications/QMLPlayer.desktop \
usr/share/icons/hicolor/64x64/apps/QtAV.svg
deb_install_list.target = qtav-players.install
deb_install_list.commands = echo \"$$join(DEB_INSTALL_LIST, \\n)\" >$$PROJECTROOT/debian/$${deb_install_list.target}
QMAKE_EXTRA_TARGETS += deb_install_list
target.depends += $${deb_install_list.target}
}

tv.files = res/tv.ini
#BIN_INSTALLS += tv
target.path = $$[QT_INSTALL_BINS]
Expand Down
11 changes: 11 additions & 0 deletions qml/libQmlAV.pro
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,17 @@ SDK_HEADERS += \
HEADERS *= \
$$SDK_HEADERS


unix:!android:!mac {
#debian
qml_module_files = qmldir Video.qml plugins.qmltypes libQmlAV.so
DEB_INSTALL_LIST = $$join(qml_module_files, \\n.$$[QT_INSTALL_QML]/QtAV/, .$$[QT_INSTALL_QML]/QtAV/)
deb_install_list.target = qml-module-qtav.install
deb_install_list.commands = echo \"$$join(DEB_INSTALL_LIST, \\n)\" >$$PROJECTROOT/debian/$${deb_install_list.target}
QMAKE_EXTRA_TARGETS += deb_install_list
target.depends += $${deb_install_list.target}
}

target.path = $$[QT_INSTALL_QML]/QtAV
qtav_qml.path = $$[QT_INSTALL_QML]/QtAV
INSTALLS += target qtav_qml
Expand Down
Empty file modified qtc_packaging/debian_generic/player.desktop
100755 → 100644
Empty file.
25 changes: 25 additions & 0 deletions src/libQtAV.pro
Original file line number Diff line number Diff line change
Expand Up @@ -414,6 +414,31 @@ mac {
}
}


unix:!android:!mac {
#debian
DEB_INSTALL_LIST = .$$[QT_INSTALL_LIBS]/libQtAV.so.*
libqtav.target = libqtav.install
libqtav.commands = echo \"$$join(DEB_INSTALL_LIST, \\n)\" >$$PROJECTROOT/debian/$${libqtav.target}
QMAKE_EXTRA_TARGETS += libqtav
target.depends *= $${libqtav.target}

DEB_INSTALL_LIST = $$join(SDK_HEADERS, \\n.$$[QT_INSTALL_HEADERS]/, .$$[QT_INSTALL_HEADERS]/)
DEB_INSTALL_LIST += .$$[QT_INSTALL_LIBS]/libQtAV.prl .$$[QT_INSTALL_LIBS]/libQt*AV.so
DEB_INSTALL_LIST += .$$[QT_INSTALL_BINS]/../mkspecs/features/av.prf .$$[QT_INSTALL_BINS]/../mkspecs/modules/qt_lib_av.pri
qtav_dev.target = qtav-dev.install
qtav_dev.commands = echo \"$$join(DEB_INSTALL_LIST, \\n)\" >$$PROJECTROOT/debian/$${qtav_dev.target}
QMAKE_EXTRA_TARGETS += qtav_dev
target.depends *= $${qtav_dev.target}

DEB_INSTALL_LIST = $$join(SDK_PRIVATE_HEADERS, \\n.$$[QT_INSTALL_HEADERS]/QtAV/*/, .$$[QT_INSTALL_HEADERS]/QtAV/*/)
DEB_INSTALL_LIST += .$$[QT_INSTALL_BINS]/../mkspecs/modules/qt_lib_av_private.pri
qtav_private_dev.target = qtav-private-dev.install
qtav_private_dev.commands = echo \"$$join(DEB_INSTALL_LIST, \\n)\" >$$PROJECTROOT/debian/$${qtav_private_dev.target}
QMAKE_EXTRA_TARGETS += qtav_private_dev
target.depends *= $${qtav_private_dev.target}
}

MODULE_INCNAME = QtAV
MODULE_VERSION = $$VERSION
#use Qt version. limited by qmake
Expand Down

0 comments on commit e4772f2

Please sign in to comment.