Autodesk_EAGLE.sh 1.32 KB
Newer Older
1 2 3 4 5 6 7
#!/bin/sh -x

# It will be run with two args: buildroot spec
BUILDROOT="$1"
SPEC="$2"

PRODUCT=eagle
8
PRODUCTDIR=/opt/$PRODUCT
9

10 11
. $(dirname $0)/common.sh

12
subst "s|^License: unknown$|License: Freeware|" $SPEC
13
subst "s|^Summary:.*|Summary: EAGLE is electronic design automation (EDA) software that lets printed circuit board (PCB)|" $SPEC
14

Vitaly Lipatov's avatar
Vitaly Lipatov committed
15 16
# move package to /opt
ROOTDIR=$(basename $(find $BUILDROOT -mindepth 1 -maxdepth 1 -type d))
17 18 19 20
mkdir $BUILDROOT/opt
mv $BUILDROOT/$ROOTDIR $BUILDROOT/opt/$PRODUCT
subst "s|\"/$ROOTDIR/|\"/opt/$PRODUCT/|" $SPEC

21
add_bin_link_command
22

Vitaly Lipatov's avatar
Vitaly Lipatov committed
23
cat <<EOF | create_file /usr/share/applications/$PRODUCT.desktop
24
[Desktop Entry]
25
Version=1.0
26 27 28 29 30 31
Type=Application
Terminal=false
Name=EAGLE
Comment=PCB design: schematic capture, board layout, and autorouter

# paths need to be absolute, no ~ allowed within this file
32 33
Exec=$PRODUCT
Icon=$PRODUCT
34 35 36 37 38 39 40 41 42

# meta data 
Categories=Engineering;Electronics;
Keywords=eagle;pcb;schematics;electronics;
MimeType=application/x-eagle-schematic;application/x-eagle-board;application/x-eagle-project;

# used to group all windows under the same launcher icon
StartupWMClass=eagle
EOF
Vitaly Lipatov's avatar
Vitaly Lipatov committed
43

44
install_file /opt/eagle/bin/eagle-logo.png /usr/share/pixmaps/$PRODUCT.png
45 46 47 48 49

# https://bugzilla.altlinux.org/44898
remove_file /opt/eagle/lib/libxcb-dri2.so.0
remove_file /opt/eagle/lib/libxcb-dri3.so.0

Vitaly Lipatov's avatar
Vitaly Lipatov committed
50
add_libs_requires