wok-6.x view xtrkcad/receipt @ rev 24326

Update some current_version
author Pascal Bellard <pascal.bellard@slitaz.org>
date Thu Jan 27 12:16:00 2022 +0000 (2022-01-27)
parents ad86373a4a8c
children
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 # What is the latest version available today?
25 current_version()
26 {
27 wget -O - https://sourceforge.net/projects/xtrkcad-fork/files/ 2>/dev/null | \
28 sed '/Development/d;/scope="row/!d;s|.*href="|"https://sourceforge.net|;q' | xargs wget -O - 2>/dev/null | \
29 sed 's| |\n|g' | sed '/Version%/!d;s|%20| |g;s|.*sion ||;s|/.*||;q'
30 }
32 # Rules to configure and make the package.
33 compile_rules()
34 {
35 # Binutils 2.22 break many packages build without LDFLAGS set correctly.
36 export LDFLAGS="$LDFLAGS -Wl,--copy-dt-needed-entries"
38 XTRKCAD_STUFF=$stuff
40 sed -e 's|share/xtrkcad/locale|share/locale|g' -i CMakeLists.txt &&
42 cmake . \
43 -D CMAKE_C_COMPILER:FILEPATH=${TOOLPREFIX}gcc \
44 -D CMAKE_CXX_COMPILER:FILEPATH=${TOOLPREFIX}c++ \
45 -D CMAKE_INSTALL_PREFIX=/usr \
46 -D XTRKCAD_USE_GTK=ON \
47 -D XTRKCAD_USE_GTK_CAIRO=ON &&
48 make PREFIX=/usr &&
49 make DESTDIR=$DESTDIR install &&
51 mkdir -p $DESTDIR/usr/share/pixmaps &&
52 cp -f $XTRKCAD_STUFF/$PACKAGE.png $DESTDIR/usr/share/pixmaps &&
54 mkdir -p $DESTDIR/usr/share/applications &&
55 cp -f $XTRKCAD_STUFF/$PACKAGE.desktop $DESTDIR/usr/share/applications &&
56 sed -e 's|^Categories=[^$]*$|Categories=Application;Railroad;|g' -i $DESTDIR/usr/share/applications/*.desktop
57 }
59 # Rules to gen a SliTaz package suitable for Tazpkg.
60 genpkg_rules()
61 {
62 mkdir -p $fs/usr/share/$PACKAGE
64 cp -f $install/usr/share/$PACKAGE/$PACKAGE.tip $fs/usr/share/$PACKAGE
65 cp -f $install/usr/share/$PACKAGE/$PACKAGE.xtq $fs/usr/share/$PACKAGE
66 cp -f $install/usr/share/$PACKAGE/logo.bmp $fs/usr/share/$PACKAGE
67 cp -a $install/usr/share/$PACKAGE/params $fs/usr/share/$PACKAGE
68 cp -a $install/usr/share/applications $fs/usr/share
69 cp -a $install/usr/share/pixmaps $fs/usr/share
70 cp -a $install/usr/bin $fs/usr
71 }