# eigenes ebuild

## flammenflitzer

Hallo

Ich benötige, als sehr seltener Ersteller eines ebuild, etwas Hilfe für ein ebuild

```
2mandvd/2mandvd-0.5.3.ebuild
```

```
# Copyright 1999-2008 Gentoo Foundation

# Distributed under the terms of the GNU General Public License

# $Header: $

EAPI="2"

inherit cmake-utils

MY_PN="2ManDVD"

DESCRIPTION="2ManDVD is the successor of ManDVD... This is a program to simply create DVD Video"

HOMEPAGE="http://de.kde-apps.org/content/show.php/2ManDVD?content=99450"

SRC_URI="http://download.tuxfamily.org/2mandvd/${MY_PN=}-${PV}.tar.gz"

LICENSE="GPL"

IUSE="xine"

SLOT="0"

KEYWORDS="~amd64 ~x86"

DEPEND=">=x11-libs/qt-4.5.0"

RDEPEND="${DEPEND}

   virtual/cdrtools

   >=app-cdr/dvd+rw-tools-5.21.4

   >=media-video/ffmpegthumbnailer-1.3.0

   >=media-video/ffmpeg-0.4.9_p20090201

   >=media-sound/sox-14.2.0

   >=media-video/mplayer-1.0_rc2_p28450

   >=media-video/dvdauthor-0.6.14

   >=media-video/mjpegtools-1.9.0

   >=media-libs/netpbm-10.44.00-r1

   >=media-libs/xine-lib-1.1.16.2"

S="${WORKDIR}/2ManDVD"

src_unpack() {

         cd "${S}"

        sed -i -e '/set(CMAKE_VERBOSE_MAKEFILE ON)/d' ${S}/CMakeLists.txt || die "Sed failed"

}
```

```
flammenflitzer olaf # emerge 2mandvd 

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.

 * Use eselect news to read news items.                         

Calculating dependencies... done!

>>> Verifying ebuild manifests

>>> Emerging (1 of 1) media-video/2mandvd-0.5.3 from unknown repo

 * 2ManDVD-0.5.3.tar.gz RMD160 SHA1 SHA256 size ;-) ...                                        [ ok ]

 * checking ebuild checksums ;-) ...                                                           [ ok ]

 * checking auxfile checksums ;-) ...                                                          [ ok ]

 * checking miscfile checksums ;-) ...                                                         [ ok ]

>>> Unpacking source...                                                                              

/var/tmp/portage/media-video/2mandvd-0.5.3/temp/environment: line 2674: cd: /var/tmp/portage/media-video/2mandvd-0.5.3/work/2ManDVD: Datei oder Verzeichnis nicht gefunden                                  

sed: kann /var/tmp/portage/media-video/2mandvd-0.5.3/work/2ManDVD/CMakeLists.txt nicht lesen: Datei oder Verzeichnis nicht gefunden                                                                         

 *                                                                                                    

 * ERROR: media-video/2mandvd-0.5.3 failed.                                                           

 * Call stack:                                                                                        

 *               ebuild.sh, line   49:  Called src_unpack                                             

 *             environment, line 2675:  Called die                                                    

 * The specific snippet of code:                                                                      

 *       sed -i -e '/set(CMAKE_VERBOSE_MAKEFILE ON)/d' ${S}/CMakeLists.txt || die "Sed failed"        

 *  The die message:                                                                                  

 *   Sed failed                                                                                       

 *                                                                                                    

 * If you need support, post the topmost build error, and the call stack if relevant.                 

 * A complete build log is located at '/var/tmp/portage/media-video/2mandvd-0.5.3/temp/build.log'.    

 * The ebuild environment file is located at '/var/tmp/portage/media-video/2mandvd-0.5.3/temp/environment'.                                                                                                 

 * This ebuild is from an overlay: '/usr/local/overlays/local/'                                       

 *                                                                                                    

>>> Failed to emerge media-video/2mandvd-0.5.3, Log file:

>>>  '/var/tmp/portage/media-video/2mandvd-0.5.3/temp/build.log'

 * Messages for package media-video/2mandvd-0.5.3:

 *

 * ERROR: media-video/2mandvd-0.5.3 failed.

 * Call stack:

 *               ebuild.sh, line   49:  Called src_unpack

 *             environment, line 2675:  Called die

 * The specific snippet of code:

 *       sed -i -e '/set(CMAKE_VERBOSE_MAKEFILE ON)/d' ${S}/CMakeLists.txt || die "Sed failed"

 *  The die message:

 *   Sed failed

 *

 * If you need support, post the topmost build error, and the call stack if relevant.

 * A complete build log is located at '/var/tmp/portage/media-video/2mandvd-0.5.3/temp/build.log'.

 * The ebuild environment file is located at '/var/tmp/portage/media-video/2mandvd-0.5.3/temp/environment'.

 * This ebuild is from an overlay: '/usr/local/overlays/local/'

 *

 * IMPORTANT: 1 news items need reading for repository 'gentoo'.

 * Use eselect news to read news items.
```

Danke

----------

## Necoro

Nicht getestet:

Ersetz mal deine komplette src_unpack durch

```
src_configure() {

 sed -i -e '/set(CMAKE_VERBOSE_MAKEFILE ON)/d' CMakeLists.txt || die "Sed failed"

}
```

/edit: Äh - da gibts keine CMakeLists.txt ...

/edit2: Der Mensch, der das geschrieben hat, verwendet qmake und nicht cmake

----------

## Necoro

```
# Copyright 1999-2009 Gentoo Foundation

# Distributed under the terms of the GNU General Public License

# $Header: $

EAPI="2"

inherit qt4

MY_PN="2ManDVD"

DESCRIPTION="2ManDVD is the successor of ManDVD... This is a program to simply create DVD Video"

HOMEPAGE="http://de.kde-apps.org/content/show.php/2ManDVD?content=99450"

SRC_URI="http://download.tuxfamily.org/2mandvd/${MY_PN=}-${PV}.tar.gz"

LICENSE="GPL-2"

IUSE="xine"

SLOT="0"

KEYWORDS="~amd64 ~x86"

DEPEND=">=x11-libs/qt-gui-4.5.0"

RDEPEND="${DEPEND}

   virtual/cdrtools

   >=app-cdr/dvd+rw-tools-5.21.4

   >=media-video/ffmpegthumbnailer-1.3.0

   >=media-video/ffmpeg-0.4.9_p20090201

   >=media-sound/sox-14.2.0

   >=media-video/mplayer-1.0_rc2_p28450

   >=media-video/dvdauthor-0.6.14

   >=media-video/mjpegtools-1.9.0

   >=media-libs/netpbm-10.44.00-r1

   xine? ( >=media-libs/xine-lib-1.1.16.2 )"

S="${WORKDIR}/2ManDVD"

src_compile () {

   eqmake4 ${MY_PN}.pro

   rm moc_*

   default

}
```

Ein funktionierendes Ebuild  :Smile: . Ich hab auch mal die qt4-Dep durch eine nach qt-gui-4.5 ersetzt, so dass nicht der ganze Rattenschwanz mitkommt

/edit: qt-dep ersetzt; license korrigiert

/edit2: moc-Dateien löschen, wie im KDE-apps artikel empfohlen

----------

## flammenflitzer

 *Quote:*   

> Der Mensch, der das geschrieben hat, verwendet qmake und nicht cmake

  Habe ich nicht gerafft. War wohl wieder etwas zu lange vor der Kiste. Danke. Das ebuild läuft durch, aber 2mandvd wird nicht installiert.

```
>>> Source compiled.                                                                                  

>>> Test phase [not enabled]: media-video/2mandvd-0.5.3                                               

>>> Install 2mandvd-0.5.3 into /var/tmp/portage/media-video/2mandvd-0.5.3/image/ category media-video

>>> Completed installing 2mandvd-0.5.3 into /var/tmp/portage/media-video/2mandvd-0.5.3/image/        

>>> Installing media-video/2mandvd-0.5.3
```

----------

## Necoro

 *flammenflitzer wrote:*   

> Das ebuild läuft durch, aber 2mandvd wird nicht installiert.

 

Oh - das hab ich nicht probiert gehabt - ein

```
src_install () {

emake DESTDIR="${D}" install

}
```

sollte das lösen.

(Kann sein, dass noch ein "|| die ..." fehlt - weiß gerade net, ob emake selber stirbt oder net ...)

----------

## flammenflitzer

```
>>> Source compiled.                                                                                  

>>> Test phase [not enabled]: media-video/2mandvd-0.5.3                                               

>>> Install 2mandvd-0.5.3 into /var/tmp/portage/media-video/2mandvd-0.5.3/image/ category media-video

make DESTDIR=/var/tmp/portage/media-video/2mandvd-0.5.3/image/ install                               

make: Für das Ziel »install« ist nichts zu tun.                                                      

>>> Completed installing 2mandvd-0.5.3 into /var/tmp/portage/media-video/2mandvd-0.5.3/image/ 
```

----------

## Necoro

Sowas ist net schön ... 

da musst du mal rausfinden was alles installiert werden muss - wenns nur die binary ist, hilft ein "dobin". Und du kannst denn auch gleich mal dem Autor ne Mail schreiben, er solle doch ein install-Target definieren  :Smile: 

----------

## flammenflitzer

```
src_install () {

dobin ${MY_PN}

}
```

 funktioniert. Es fehlt aber einiges. Ist z.B. nur auf französisch. Besser wäre

```

src_install() {

dodir /opt/${MY_PN}                #soll in /opt/2ManDVD installiert werden

exeinto /opt/${MY_PN}               

doexe ${MY_PN}/${MY_PN}            #2ManDVD soll in /opt/2ManDVD 

doexe ${MY_PN}/2mandvd_*.qm        #2mandvd_en.qm  2mandvd_pl.qm sollen in /opt/2ManDVD landen

dodir /usr/bin                      

dosym /opt/${MY_PN}/${MY_PN} /usr/bin/${MY_PN}  #ein Link soll von /opt/2ManDVD/2ManDVD auf/bin/2ManDVD erzeugt werden

dodir /usr/share/${MY_PN}                       #ein Desktop Eintrag soll erstellt werden

dodir /usr/share/applnk/Multimedia

 

echo "[Desktop Entry]

Encoding=UTF-8

Type=Application

Exec=2ManDVD

Icon=mandvd.png

Comment=Simple DVD Video creator

Name=2ManDVD

Terminal=false

GenericName=DVD Video Creator" > ${D}/usr/share/applnk/Multimedia/2ManDVD.desktop

 

dodir /usr/share/icons

insinto /usr/share/icons

newins ${S}/${MY_PN}/Interface/mandvd.png mandvd.png

}
```

```
>>> Source compiled.                                                                                  

>>> Test phase [not enabled]: media-video/2mandvd-0.5.3                                               

>>> Install 2mandvd-0.5.3 into /var/tmp/portage/media-video/2mandvd-0.5.3/image/ category media-video

install: Aufruf von stat für „2ManDVD/2ManDVD“ nicht möglich: Ist kein Verzeichnis                   

!!! doexe: 2ManDVD/2ManDVD does not exist                                                            

install: Aufruf von stat für „2ManDVD/2mandvd_*.qm“ nicht möglich: Ist kein Verzeichnis              

!!! doexe: 2ManDVD/2mandvd_*.qm does not exist                                                       

!!! newins: /var/tmp/portage/media-video/2mandvd-0.5.3/work/2ManDVD/2ManDVD/Interface/mandvd.png does not exist                                                                                             

>>> Completed installing 2mandvd-0.5.3 into /var/tmp/portage/media-video/2mandvd-0.5.3/image/         

 * QA Notice: file does not exist:

 *                                

 *      doexe: 2ManDVD/2ManDVD does not exist

 *      doexe: 2ManDVD/2mandvd_*.qm does not exist

 *      newins: /var/tmp/portage/media-video/2mandvd-0.5.3/work/2ManDVD/2ManDVD/Interface/mandvd.png does not exist                                                                                         

>>> Installing media-video/2mandvd-0.5.3

>>> Recording media-video/2mandvd in "world" favorites file...

>>> Auto-cleaning packages...  
```

----------

## flammenflitzer

Nicht ganz schick, aber funktioniert erst einmal.

```
# Copyright 1999-2009 Gentoo Foundation

# Distributed under the terms of the GNU General Public License

# $Header: $

EAPI="2"

inherit qt4

MY_PN="2ManDVD"

DESCRIPTION="2ManDVD is the successor of ManDVD... This is a program to simply create DVD Video"

HOMEPAGE="http://de.kde-apps.org/content/show.php/2ManDVD?content=99450"

SRC_URI="http://download.tuxfamily.org/2mandvd/${MY_PN=}-${PV}.tar.gz"

LICENSE="GPL-2"

IUSE="xine"

SLOT="0"

KEYWORDS="~amd64 ~x86"

DEPEND=">=x11-libs/qt-gui-4.5.0"

RDEPEND="${DEPEND}

   virtual/cdrtools

   >=app-cdr/dvd+rw-tools-5.21.4

   >=media-video/ffmpegthumbnailer-1.3.0

   >=media-video/ffmpeg-0.4.9_p20090201

   >=media-sound/sox-14.2.0

   >=media-video/mplayer-1.0_rc2_p28450

   >=media-video/dvdauthor-0.6.14

   >=media-video/mjpegtools-1.9.0

   >=media-libs/netpbm-10.44.00-r1

   xine? ( >=media-libs/xine-lib-1.1.16.2 )"

S="${WORKDIR}/2ManDVD"

src_compile () {

   eqmake4 ${MY_PN}.pro

   rm moc_*

   default

}

src_install() {

dodir /opt/${MY_PN}                #soll in /opt/2ManDVD installiert werden

exeinto /opt/${MY_PN}               

doexe ${MY_PN}           #2ManDVD soll in /opt/2ManDVD 

doexe 2mandvd_*.qm       #2mandvd_en.qm  2mandvd_pl.qm sollen in /opt/2ManDVD landen

doexe Interface/*.png    #alle Icons in /opt/2ManDVD

dodir /usr/bin                      

dosym /opt/${MY_PN}/${MY_PN} /usr/bin/${MY_PN}  #ein Link soll von /opt/2ManDVD/2ManDVD auf/bin/2ManDVD erzeugt werden

#dosym /opt/${MY_PN}/*.png /usr/share/2ManDVD

#dosym /opt/${MY_PN}/mandvd.png /usr/share/pixmaps

dodir /usr/share/${MY_PN}                       #ein Desktop Eintrag soll erstellt werden

dodir /usr/share/applnk/Multimedia

 

echo "[Desktop Entry]

Encoding=UTF-8

Type=Application

Exec=2ManDVD

Icon=mandvd.png

Comment=Simple DVD Video creator

Name=2ManDVD

Terminal=false

GenericName=DVD Video Creator" > ${D}/usr/share/applnk/Multimedia/2ManDVD.desktop

 

dodir /usr/share/icons

insinto /usr/share/icons

newins Interface/mandvd.png mandvd.png

}
```

----------

