View previous topic :: View next topic |
Author |
Message |
l3u Advocate
Joined: 26 Jan 2005 Posts: 2545 Location: Konradsreuth (Germany)
|
Posted: Tue Feb 16, 2016 12:59 pm Post subject: Hilfe bei ebuild |
|
|
Hallo allerseits!
Ich hab ein kleines Problem beim Schreiben eines ebuilds. Und ich bekomm's einfach nicht hin …
Ich will ein ebuild für vcontrold schreiben. Das hat svn-Quellen – so weit, so gut. Jetzt gibt es aber im Trunk zwei Verzeichnisse. Eines namens "vcontrold", was den eigentlichen Quellcode enthält, und eines namens "xml-32", was Dateien enthält, die später nach /etc kopiert werden müssen.
Jetzt bekomm ich's um's Verrecken nicht hin, dass der vollständige Trunk mit beiden Verzeichnissen ausgecheckt wird, der Build-Prozess aber nur in einem Unterverzeichnis läuft. Kann mir einer von euch sagen, was ich da tun muss? Gibt's doch sicher öfters, sowas? Das "cd $S/vcontrold" in src_prepare() ist ja sicher auch nicht okay so.
Hier ist das ebuild:
Code: | EAPI=5
inherit subversion
DESCRIPTION="Daemon for communication with Viessmann Vito heatings"
HOMEPAGE="http://openv.wikispaces.com/"
ESVN_REPO_URI="svn://svn.code.sf.net/p/vcontrold/code/trunk/"
ESVN_PROJECT="vcontrold"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE=""
DEPEND="dev-libs/libxml2"
RDEPEND="${DEPEND}"
src_prepare() {
cd $S/vcontrold
chmod +x auto-build.sh
./auto-build.sh
}
src_compile() {
S="${S}/vcontrold"
econf
emake
} |
Vielen Dank für jede Hilfe! |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Tue Feb 16, 2016 2:15 pm Post subject: |
|
|
Setzen von S bzw. WORKDIR im global scope hast Du schon versucht? |
|
Back to top |
|
|
l3u Advocate
Joined: 26 Jan 2005 Posts: 2545 Location: Konradsreuth (Germany)
|
Posted: Tue Feb 16, 2016 2:31 pm Post subject: |
|
|
WORKDIR darf/kann man so weit ich weiß nicht verändern. Hat auch nicht geklappt ;-)
Ich hatte auch schon S="${S}/vcontrold" vor src_prepare(), das führt aber nur dazu, dass in $WORKDIR ein zusätzliches Verzeichnis namens "vcontrold" erstellt wird, und die Quellen dann darin entpackt werden. Also quasi gibt es dann nur ein weiteres Überverzeichnis. Hinterher ist aber wieder das selbe Problem … |
|
Back to top |
|
|
mv Watchman
Joined: 20 Apr 2005 Posts: 6747
|
Posted: Tue Feb 16, 2016 3:23 pm Post subject: |
|
|
l3u wrote: | Ich hatte auch schon S="${S}/vcontrold" vor src_prepare(), das führt aber nur dazu, dass in $WORKDIR ein zusätzliches Verzeichnis namens "vcontrold" erstellt wird, und die Quellen dann darin entpackt werden. |
In dem File würde ich das S="${S}/vcontrold" im global scope lassen und Code: | src_unpack() {
local S
S=${WORKDIR}/${P}
subversion_src_unpack
} | dazufügen |
|
Back to top |
|
|
l3u Advocate
Joined: 26 Jan 2005 Posts: 2545 Location: Konradsreuth (Germany)
|
Posted: Tue Feb 16, 2016 6:06 pm Post subject: |
|
|
Vielen Dank für die Hilfe!
Der Vollständigkeit halber hier das ebuild:
Code: | # Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
EAPI=5
inherit subversion
DESCRIPTION="Daemon for communication with Viessmann Vito heatings"
HOMEPAGE="http://openv.wikispaces.com/"
ESVN_REPO_URI="svn://svn.code.sf.net/p/vcontrold/code/trunk/"
ESVN_PROJECT="vcontrold"
LICENSE="GPL-2"
SLOT="0"
KEYWORDS=""
IUSE=""
DEPEND="dev-libs/libxml2"
RDEPEND="${DEPEND}"
S="${S}/vcontrold"
src_unpack() {
local S
S=${WORKDIR}/${P}
subversion_src_unpack
}
src_prepare() {
chmod +x auto-build.sh
./auto-build.sh
}
src_install() {
einstall
doinitd ${FILESDIR}/vcontrold
dodir /etc/vcontrold
cp -r ${WORKDIR}/${P}/xml-32/* ${ED}/etc/vcontrold/
dodoc ../LIESMICH.txt AUTHORS README
} |
und files/vcontrold:
Code: | #!/sbin/runscript
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
# $Id$
PIDFILE="/var/run/vcontrold.pid"
EXEC="/usr/sbin/vcontrold"
start() {
ebegin "Starting vcontrold"
start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $EXEC
eend $?
}
stop() {
ebegin "Stopping vcontrold"
start-stop-daemon --stop --exec $EXEC --pidfile $PIDFILE
eend $?
} |
|
|
Back to top |
|
|
timeraider n00b
Joined: 27 Jul 2015 Posts: 41
|
Posted: Thu Dec 22, 2016 1:43 pm Post subject: |
|
|
Alternative wäre natürlich die Dateien des 'xml-32' branches in ein eigenes Ebuild-package auszulagern. |
|
Back to top |
|
|
|