megacoffee.net Gentoo overlay - legacy mirror
We have moved to Git. This repository is only provided for compatibility with old installations. Learn how to migrate your installation here.
comparison media-libs/blackmagic-desktop-video/blackmagic-desktop-video-10.6.6.ebuild @ 156:387c0f8f8ebc
media-libs/blackmagic-desktop-video: finalizing 10.6.6 ebuild; added license_groups file
author | Daniel Neugebauer <dneuge@energiequant.de> |
---|---|
date | Sun, 29 May 2016 21:52:34 +0200 |
parents | f469771196a1 |
children | 8f57dd94cc9c |
comparison
equal
deleted
inserted
replaced
155:f469771196a1 | 156:387c0f8f8ebc |
---|---|
1 # Copyright 1999-2016 Gentoo Foundation | 1 # Copyright 1999-2016 Gentoo Foundation |
2 # Distributed under the terms of the GNU General Public License v2 | 2 # Distributed under the terms of the GNU General Public License v2 |
3 | 3 |
4 # TODOs: | 4 # TODOs: |
5 # - figure out exact kernel version required to build the module without errors | |
6 # - test if it works nonetheless | |
7 # - warn/abort if wrong kernel version | |
8 # - inheriting linux-info breaks installation?! | |
9 # - fix QA notice about installing symlinks in /usr/lib | 5 # - fix QA notice about installing symlinks in /usr/lib |
10 | 6 |
11 EAPI=5 | 7 EAPI=5 |
12 | 8 |
13 inherit linux-mod | 9 inherit linux-mod |
14 #inherit linux-info | |
15 | 10 |
16 DESCRIPTION="Desktop Video - drivers and tools for products by Blackmagic Design including DeckLink and Intensity" | 11 DESCRIPTION="Desktop Video - drivers and tools for products by Blackmagic Design including DeckLink and Intensity" |
17 HOMEPAGE="http://www.blackmagicdesign.com/" | 12 HOMEPAGE="http://www.blackmagicdesign.com/" |
18 HOMEPAGE_DOWNLOAD_NAME="Desktop Video ${PV} Update" | 13 HOMEPAGE_DOWNLOAD_NAME="Desktop Video ${PV} Update" |
19 | 14 |
40 einfo "Please visit ${HOMEPAGE} and download \"${HOMEPAGE_DOWNLOAD_NAME}\"" | 35 einfo "Please visit ${HOMEPAGE} and download \"${HOMEPAGE_DOWNLOAD_NAME}\"" |
41 einfo "for your product from the support section and move it to ${DISTDIR}" | 36 einfo "for your product from the support section and move it to ${DISTDIR}" |
42 einfo "" | 37 einfo "" |
43 einfo " expected filename: ${SRC_URI}" | 38 einfo " expected filename: ${SRC_URI}" |
44 einfo "" | 39 einfo "" |
45 einfo "The license should be shown and has to be accepted before the download" | 40 einfo "If your browser downloads a .tar.gz file you will need to gunzip it." |
46 einfo "starts." | |
47 } | 41 } |
48 | 42 |
49 #pkg_pretend() { | 43 pkg_pretend() { |
50 # if kernel_is -ge 4 6 ; then | 44 if kernel_is -gt 3 18; then |
51 # # 12345678901234567890123456789012345678901234567890123456789012345678901234567890 | 45 # 12345678901234567890123456789012345678901234567890123456789012345678901234567890 |
52 # ewarn "Your kernel version seems to be unsupported; please consider downgrading to 3.16" | 46 ewarn "Your kernel version seems to be unsupported; please consider downgrading to 3.18" |
53 # ewarn "if modules don't work." | 47 ewarn "if modules don't work." |
54 # fi | 48 fi |
55 #} | 49 } |
56 | 50 |
57 src_unpack() { | 51 src_unpack() { |
58 unpack ${A} | 52 unpack ${A} |
59 | 53 |
60 cd ${WORKDIR} | 54 cd ${WORKDIR} |
73 linux-mod_src_compile | 67 linux-mod_src_compile |
74 } | 68 } |
75 | 69 |
76 src_install() { | 70 src_install() { |
77 # all pre-built binaries should go into /opt and be symlinked to usr/bin etc. | 71 # all pre-built binaries should go into /opt and be symlinked to usr/bin etc. |
78 installdir="${D}/opt/blackmagic-desktop-video" | 72 finalinstalldir="/opt/blackmagic-desktop-video" |
73 installdir="${D}${finalinstalldir}" | |
79 | 74 |
80 mkdir -p ${installdir} | 75 mkdir -p ${installdir} |
81 cp -a ${WORKDIR}/${UNPACKED_DIR}/* ${installdir}/ | 76 cp -a ${WORKDIR}/${UNPACKED_DIR}/* ${installdir}/ |
77 | |
78 # copy text files (readme and license) from parent directory | |
79 cp -a ${WORKDIR}/Blackmagic_Desktop_Video_Linux_${PV}/*.txt ${installdir}/ | |
82 | 80 |
83 # there should a blank directory in /etc according to the archive... | 81 # there should a blank directory in /etc according to the archive... |
84 mkdir -p ${installdir}/etc/blackmagic | 82 mkdir -p ${installdir}/etc/blackmagic |
85 chmod 755 ${installdir}/etc/blackmagic | 83 chmod 755 ${installdir}/etc/blackmagic |
86 | 84 |
88 symlinks=( | 86 symlinks=( |
89 'etc/init.d/DesktopVideoHelper' | 87 'etc/init.d/DesktopVideoHelper' |
90 'usr/bin/BlackmagicDesktopVideoUtility' | 88 'usr/bin/BlackmagicDesktopVideoUtility' |
91 'usr/bin/BlackmagicFirmwareUpdater' | 89 'usr/bin/BlackmagicFirmwareUpdater' |
92 'usr/bin/BlackmagicFirmwareUpdaterGui' | 90 'usr/bin/BlackmagicFirmwareUpdaterGui' |
91 'usr/lib/blackmagic' | |
93 'usr/lib/libDeckLinkAPI.so' | 92 'usr/lib/libDeckLinkAPI.so' |
94 'usr/lib/libDeckLinkPreviewAPI.so' | 93 'usr/lib/libDeckLinkPreviewAPI.so' |
95 'usr/lib/blackmagic' | |
96 'usr/sbin/DesktopVideoHelper' | 94 'usr/sbin/DesktopVideoHelper' |
97 'usr/share/applications/BlackmagicDesktopVideoUtility.desktop' | 95 'usr/share/applications/BlackmagicDesktopVideoUtility.desktop' |
98 'usr/share/applications/BlackmagicFirmwareUpdaterGui.desktop' | 96 'usr/share/applications/BlackmagicFirmwareUpdaterGui.desktop' |
99 'usr/share/doc/desktopvideo' | 97 'usr/share/doc/desktopvideo' |
100 'usr/share/doc/desktopvideo-gui' | 98 'usr/share/doc/desktopvideo-gui' |
112 | 110 |
113 for path in "${symlinks[@]}"; do | 111 for path in "${symlinks[@]}"; do |
114 dosym /opt/blackmagic-desktop-video/${path} ${path} | 112 dosym /opt/blackmagic-desktop-video/${path} ${path} |
115 done | 113 done |
116 | 114 |
115 # dneuge: no clue on how to use this... | |
116 ## QA notice says we should generate a linker script if we don't place libraries in /usr/lib | |
117 ## see: https://devmanual.gentoo.org/eclass-reference/toolchain-funcs.eclass/index.html | |
118 #gen_usr_ldscript usr/lib/libDeckLinkAPI.so usr/lib/libDeckLinkPreviewAPI.so | |
119 | |
117 # don't symlink man-pages, install a copy instead | 120 # don't symlink man-pages, install a copy instead |
118 doman usr/share/man/man1/*.1 | 121 doman usr/share/man/man1/*.1 |
119 | 122 |
120 # udev rule should be placed in /lib/udev/rules.d instead | 123 # udev rule should be placed in /lib/udev/rules.d instead |
121 dosym /opt/blackmagic-desktop-video/etc/udev/rules.d/55-blackmagic.rules /lib/udev/rules.d/55-blackmagic.rules | 124 dosym /opt/blackmagic-desktop-video/etc/udev/rules.d/55-blackmagic.rules /lib/udev/rules.d/55-blackmagic.rules |
133 # kernel module | 136 # kernel module |
134 linux-mod_pkg_postinst | 137 linux-mod_pkg_postinst |
135 | 138 |
136 # 12345678901234567890123456789012345678901234567890123456789012345678901234567890 | 139 # 12345678901234567890123456789012345678901234567890123456789012345678901234567890 |
137 einfo "" | 140 einfo "" |
138 #einfo "Please do *NOT* report any QA errors to Gentoo or Blackmagic!" | 141 einfo "Please do *NOT* report any QA errors to Gentoo or Blackmagic!" |
139 #einfo "" | 142 einfo "" |
140 einfo "The kernel module to load is simply called blackmagic, but there's also" | 143 einfo "Kernel modules are blackmagic and blackmagic-io. Try blackmagic if in doubt." |
141 einfo "blackmagic-io. When upgrading, please rmmod both first. Then modprobe blackmagic" | 144 einfo "When upgrading, please rmmod both first. Then modprobe blackmagic to see if it" |
142 einfo "to see if it works (it should print your devices to kernel log)." | 145 einfo "works (it should print your devices to kernel log)." |
143 einfo "" | 146 einfo "" |
144 einfo "Installed tools are BlackmagicFirmwareUpdater, BlackmagicFirmwareUpdaterGui and" | 147 einfo "Installed tools are BlackmagicFirmwareUpdater, BlackmagicFirmwareUpdaterGui and" |
145 einfo "BlackmagicDesktopVideoUtility (former BlackmagicControlPanel)." | 148 einfo "BlackmagicDesktopVideoUtility (former BlackmagicControlPanel)." |
146 einfo "" | 149 einfo "" |
147 if use autostart; then | 150 if use autostart; then |
161 einfo "" | 164 einfo "" |
162 einfo " 2) Your firmware may be outdated. Make sure you reload the modules (or simply" | 165 einfo " 2) Your firmware may be outdated. Make sure you reload the modules (or simply" |
163 einfo " reboot) and then run BlackmagicFirmwareUpdater or, if you prefer," | 166 einfo " reboot) and then run BlackmagicFirmwareUpdater or, if you prefer," |
164 einfo " BlackmagicFirmwareUpdaterGui" | 167 einfo " BlackmagicFirmwareUpdaterGui" |
165 einfo "" | 168 einfo "" |
169 einfo "License can be found in: ${finalinstalldir}/License.txt" | |
170 einfo "" | |
166 einfo "We are reloading udev rules now..." | 171 einfo "We are reloading udev rules now..." |
167 /bin/udevadm control --reload-rules || einfo " ... failed, you may want to check this before rebooting!" | 172 /bin/udevadm control --reload-rules || einfo " ... failed, you may want to check this before rebooting!" |
168 } | 173 } |
169 | 174 |
170 pkg_postrm() { | 175 pkg_postrm() { |