Skip to content

Commit

Permalink
[www-plugins/chrome-token-signing] rewrited ebuild
Browse files Browse the repository at this point in the history
  • Loading branch information
SpiderX committed Oct 27, 2018
1 parent 15e0913 commit 579e8e1
Show file tree
Hide file tree
Showing 3 changed files with 54 additions and 51 deletions.
50 changes: 25 additions & 25 deletions www-plugins/chrome-token-signing/chrome-token-signing-1.0.7.ebuild
Expand Up @@ -10,52 +10,52 @@ HOMEPAGE="https://github.com/open-eid/chrome-token-signing http://id.ee/"
SRC_URI="https://github.com/open-eid/${PN}/archive/v${PV}.tar.gz -> ${P}.tar.gz"

LICENSE="LGPL-2.1"
KEYWORDS="~amd64 ~x86"
KEYWORDS="~amd64"
SLOT="0"
IUSE="firefox libressl"
IUSE="chromium firefox libressl vivaldi"

RDEPEND="dev-qt/qtcore:5
BDEPEND="virtual/pkgconfig"
DEPEND="dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
dev-qt/qtnetwork:5
sys-apps/pcsc-lite
firefox? ( || ( www-client/firefox www-client/firefox-bin ) )
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )"
DEPEND="${RDEPEND}
virtual/pkgconfig"
RDEPEND="${DEPEND}"

DOCS=( AUTHORS {README,RELEASE-NOTES}.md )
S="${WORKDIR}/${P}/host-linux"

src_prepare() {
default

# Don't run qmake from makefile
sed -i '/qmake VERSION=$(VERSIONEX)/d' host-linux/GNUmakefile \
|| die "sed failed for GNUmakefile"
# Don't install all
# Don't install everything without need
sed -i '/INSTALLS += /s|target hostconf ffconf extension ffextension|target hostconf extension|' \
host-linux/chrome-token-signing.pro \
chrome-token-signing.pro \
|| die "sed failed for chrome-token-signing.pro"
}

src_configure() {
cd host-linux || die "sed failed for cd"
if use firefox ; then
echo "INSTALLS += ffconf ffextension" >> \
host-linux/chrome-token-signing.pro || die "echo failed"
fi
usex firefox "INSTALLS += ffconf ffextension" "" \
>> chrome-token-signing.pro

eqmake5
# remove upstream's GNUmakefile
eqmake5 VERSION="${PV}" -o GNUmakefile chrome-token-signing.pro
}

src_install() {
einstalldocs

emake INSTALL_ROOT="${ED}" -C host-linux install
emake INSTALL_ROOT="${ED}" install

dosym ../../opt/chrome/native-messaging-hosts/ee.ria.esteid.json \
/etc/chromium/native-messaging-hosts/ee.ria.esteid.json
dosym ../../../../opt/google/chrome/extensions/ckjefchnfjhjfedoccjbhjpbncimppeg.json \
/usr/share/chromium/extensions/ckjefchnfjhjfedoccjbhjpbncimppeg.json
if use chromium ; then
dosym ../../opt/chrome/native-messaging-hosts/ee.ria.esteid.json \
/etc/chromium/native-messaging-hosts/ee.ria.esteid.json
dosym ../../../../opt/google/chrome/extensions/ckjefchnfjhjfedoccjbhjpbncimppeg.json \
/usr/share/chromium/extensions/ckjefchnfjhjfedoccjbhjpbncimppeg.json
fi
if use vivaldi ; then
dosym ../../opt/chrome/native-messaging-hosts/ee.ria.esteid.json \
/etc/vivaldi/native-messaging-hosts/ee.ria.esteid.json
dosym ../../../../opt/google/chrome/extensions/ckjefchnfjhjfedoccjbhjpbncimppeg.json \
/usr/share/vivaldi/extensions/ckjefchnfjhjfedoccjbhjpbncimppeg.json
fi
}
51 changes: 26 additions & 25 deletions www-plugins/chrome-token-signing/chrome-token-signing-9999.ebuild
Expand Up @@ -3,60 +3,61 @@

EAPI=7

EGIT_REPO_URI="https://github.com/open-eid/${PN}.git"

inherit git-r3 qmake-utils

DESCRIPTION="Native client and extension for signing with your eID on the web"
HOMEPAGE="https://github.com/open-eid/chrome-token-signing http://id.ee/"
SRC_URI=""
EGIT_REPO_URI="https://github.com/open-eid/${PN}.git"

LICENSE="LGPL-2.1"
KEYWORDS=""
SLOT="0"
IUSE="firefox libressl"
IUSE="chromium firefox libressl vivaldi"

RDEPEND="dev-qt/qtcore:5
BDEPEND="virtual/pkgconfig"
DEPEND="dev-qt/qtcore:5
dev-qt/qtgui:5
dev-qt/qtwidgets:5
dev-qt/qtnetwork:5
sys-apps/pcsc-lite
firefox? ( || ( www-client/firefox www-client/firefox-bin ) )
!libressl? ( dev-libs/openssl:0= )
libressl? ( dev-libs/libressl:0= )"
DEPEND="${RDEPEND}
virtual/pkgconfig"
RDEPEND="${DEPEND}"

DOCS=( AUTHORS {README,RELEASE-NOTES}.md )
S="${WORKDIR}/${P}/host-linux"

src_prepare() {
default

# Don't run qmake from makefile
sed -i '/qmake VERSION=$(VERSIONEX)/d' host-linux/GNUmakefile \
|| die "sed failed for GNUmakefile"
# Don't install all
# Don't install everything without need
sed -i '/INSTALLS += /s|target hostconf ffconf extension ffextension|target hostconf extension|' \
host-linux/chrome-token-signing.pro \
chrome-token-signing.pro \
|| die "sed failed for chrome-token-signing.pro"
}

src_configure() {
cd host-linux || die "sed failed for cd"
if use firefox ; then
echo "INSTALLS += ffconf ffextension" >> \
host-linux/chrome-token-signing.pro || die "echo failed"
fi
usex firefox "INSTALLS += ffconf ffextension" "" \
>> chrome-token-signing.pro

eqmake5
# remove upstream's GNUmakefile
eqmake5 VERSION="${PV}" -o GNUmakefile chrome-token-signing.pro
}

src_install() {
einstalldocs
emake INSTALL_ROOT="${ED}" install

emake INSTALL_ROOT="${ED}" -C host-linux install

dosym ../../opt/chrome/native-messaging-hosts/ee.ria.esteid.json \
/etc/chromium/native-messaging-hosts/ee.ria.esteid.json
dosym ../../../../opt/google/chrome/extensions/ckjefchnfjhjfedoccjbhjpbncimppeg.json \
/usr/share/chromium/extensions/ckjefchnfjhjfedoccjbhjpbncimppeg.json
if use chromium ; then
dosym ../../opt/chrome/native-messaging-hosts/ee.ria.esteid.json \
/etc/chromium/native-messaging-hosts/ee.ria.esteid.json
dosym ../../../../opt/google/chrome/extensions/ckjefchnfjhjfedoccjbhjpbncimppeg.json \
/usr/share/chromium/extensions/ckjefchnfjhjfedoccjbhjpbncimppeg.json
fi
if use vivaldi ; then
dosym ../../opt/chrome/native-messaging-hosts/ee.ria.esteid.json \
/etc/vivaldi/native-messaging-hosts/ee.ria.esteid.json
dosym ../../../../opt/google/chrome/extensions/ckjefchnfjhjfedoccjbhjpbncimppeg.json \
/usr/share/vivaldi/extensions/ckjefchnfjhjfedoccjbhjpbncimppeg.json
fi
}
4 changes: 3 additions & 1 deletion www-plugins/chrome-token-signing/metadata.xml
Expand Up @@ -15,7 +15,9 @@
since version 50 Chrome extensions.
</longdescription>
<use>
<flag name="firefox">Install plugin for firefox</flag>
<flag name="chromium">Install plugin for <pkg>www-client/chromium</pkg></flag>
<flag name="firefox">Install plugin for <pkg>www-client/firefox</pkg></flag>
<flag name="vivaldi">Install plugin for <pkg>www-client/vivaldi</pkg></flag>
</use>
<upstream>
<remote-id type="github">open-eid/chrome-token-signing</remote-id>
Expand Down

0 comments on commit 579e8e1

Please sign in to comment.