wok-current view xtrkcad/receipt @ rev 24108

Up rdesktop (1.9.0)
author Pascal Bellard <pascal.bellard@slitaz.org>
date Tue Sep 28 08:31:51 2021 +0000 (2021-09-28)
parents 74e013002f3d
children 095836df71b7
line source
1 # SliTaz package receipt.
3 PACKAGE="xtrkcad"
4 VERSION="5.1.2a"
5 CATEGORY="games"
6 SHORT_DESC="A CAD program for designing model railroad layouts."
7 MAINTAINER="rcx@zoominternet.net"
8 LICENSE="GPL2"
9 WEB_SITE="http://www.xtrkcad.org/"
11 TARBALL="$PACKAGE-source-$VERSION.tar.gz"
12 WGET_URL="$SF_MIRROR/$PACKAGE-fork/$TARBALL"
13 #WGET_URL="http://users.zoominternet.net/~rcx/$TARBALL"
15 DEPENDS="atk cairo expat fontconfig freetype glib glibc-base gtk+
16 libgio libgtkhtml libpng libxcb libxml2 menu-railroad pango pixman
17 xcb-util xorg-libX11 xorg-libXau xorg-libXcomposite xorg-libXcursor
18 xorg-libXdamage xorg-libXdmcp xorg-libXext xorg-libXfixes
19 xorg-libXinerama xorg-libXrender zlib"
20 BUILD_DEPENDS="cmake doxygen gettext gtk+-dev libgtkhtml-dev libxml2-dev
21 pkg-config xorg-kbproto xorg-libX11-dev xorg-libXau-dev
22 xorg-libXdmcp-dev xorg-renderproto xorg-xproto zlib-dev"
24 current_version()
25 {
26 wget -O - https://sourceforge.net/projects/xtrkcad-fork/files/ 2>/dev/null | \
27 sed '/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
28 sed 's| |\n|g' | sed '/Version%/!d;s|%20| |g;s|.*sion ||;s|/.*||;q'
29 }
31 # Rules to configure and make the package.
32 compile_rules()
33 {
34 # Binutils 2.22 break many packages build without LDFLAGS set correctly.
35 export LDFLAGS="$LDFLAGS -Wl,--copy-dt-needed-entries"
37 XTRKCAD_STUFF=$stuff
39 sed -e 's|share/xtrkcad/locale|share/locale|g' -i CMakeLists.txt &&
41 cmake . \
42 -D CMAKE_C_COMPILER:FILEPATH=${TOOLPREFIX}gcc \
43 -D CMAKE_CXX_COMPILER:FILEPATH=${TOOLPREFIX}c++ \
44 -D CMAKE_INSTALL_PREFIX=/usr \
45 -D XTRKCAD_USE_GTK=ON \
46 -D XTRKCAD_USE_GTK_CAIRO=ON &&
47 make PREFIX=/usr &&
48 make DESTDIR=$DESTDIR install &&
50 mkdir -p $DESTDIR/usr/share/pixmaps &&
51 cp -f $XTRKCAD_STUFF/$PACKAGE.png $DESTDIR/usr/share/pixmaps &&
53 mkdir -p $DESTDIR/usr/share/applications &&
54 cp -f $XTRKCAD_STUFF/$PACKAGE.desktop $DESTDIR/usr/share/applications &&
55 sed -e 's|^Categories=[^$]*$|Categories=Application;Railroad;|g' -i $DESTDIR/usr/share/applications/*.desktop
56 }
58 # Rules to gen a SliTaz package suitable for Tazpkg.
59 genpkg_rules()
60 {
61 mkdir -p $fs/usr/share/$PACKAGE
63 cp -f $install/usr/share/$PACKAGE/$PACKAGE.tip $fs/usr/share/$PACKAGE
64 cp -f $install/usr/share/$PACKAGE/$PACKAGE.xtq $fs/usr/share/$PACKAGE
65 cp -f $install/usr/share/$PACKAGE/logo.bmp $fs/usr/share/$PACKAGE
66 cp -a $install/usr/share/$PACKAGE/params $fs/usr/share/$PACKAGE
67 cp -a $install/usr/share/applications $fs/usr/share
68 cp -a $install/usr/share/pixmaps $fs/usr/share
69 cp -a $install/usr/bin $fs/usr
70 }