<commit_before>#!/bin/sh -x

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

PRODUCT=anydesk

. $(dirname $0)/common.sh

#mkdir -p $BUILDROOT/etc/systemd/system/
#mv -fv $BUILDROOT/usr/share/anydesk/files/systemd/anydesk.service $BUILDROOT/etc/systemd/system/anydesk.service
#subst "s|/usr/share/anydesk/files/systemd/anydesk.service|/etc/systemd/system/anydesk.service|g" $SPEC

#mkdir -p $BUILDROOT/etc/rc.d/init.d/
#mv -fv $BUILDROOT/usr/share/anydesk/files/init/anydesk $BUILDROOT/etc/rc.d/init.d/anydesk
#subst "s|.*/etc/default/NetworkManager.*||" $BUILDROOT/etc/rc.d/init.d/anydesk
#subst "s|/usr/share/anydesk/files/init/anydesk|/etc/rc.d/init.d/anydesk|" $SPEC

# install all requires packages before packing (the list have got with rpmreqs anydesk)
epm install --skip-installed fontconfig glib2 libatk libcairo libfreetype libgdk-pixbuf libgio libGL libGLU libgtk+2 libICE libpango libpolkit \
    libSM libX11 libxcb libXdamage libXext libXfixes libXi libxkbfile libXmu libXrandr libXrender libXt libXtst polkit

subst '1iAutoProv:no' $SPEC

remove_file usr/share/anydesk/files/init/anydesk

# put service file to the normal place
mkdir -p $BUILDROOT/etc/systemd/system/
cp $BUILDROOT/usr/share/anydesk/files/systemd/anydesk.service $BUILDROOT/etc/systemd/system/anydesk.service
remove_file /usr/share/anydesk/files/systemd/anydesk.service
pack_file /etc/systemd/system/anydesk.service


LIBDIR=/usr/lib64
[ -d $BUILDROOT$LIBDIR ] || LIBDIR=/usr/lib

# don't check lib if missed
[ ! -d $BUILDROOT$LIBDIR ] && exit

epm assure patchelf || exit
for i in $BUILDROOT$LIBDIR/anydesk/{libgdkglext-x11-1.0.*,libgtkglext-x11-1.0.*} ; do
    a= patchelf --set-rpath '$ORIGIN/' $i
done

# /usr/libexec/anydesk: library libpangox-1.0.so.0 not found
for i in $BUILDROOT/usr/libexec/anydesk ; do<commit_msg>epm repack anydesk: fix requires (ALT bug 42403)<commit_after>#!/bin/sh -x

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

PRODUCT=anydesk

. $(dirname $0)/common.sh

#mkdir -p $BUILDROOT/etc/systemd/system/
#mv -fv $BUILDROOT/usr/share/anydesk/files/systemd/anydesk.service $BUILDROOT/etc/systemd/system/anydesk.service
#subst "s|/usr/share/anydesk/files/systemd/anydesk.service|/etc/systemd/system/anydesk.service|g" $SPEC

#mkdir -p $BUILDROOT/etc/rc.d/init.d/
#mv -fv $BUILDROOT/usr/share/anydesk/files/init/anydesk $BUILDROOT/etc/rc.d/init.d/anydesk
#subst "s|.*/etc/default/NetworkManager.*||" $BUILDROOT/etc/rc.d/init.d/anydesk
#subst "s|/usr/share/anydesk/files/init/anydesk|/etc/rc.d/init.d/anydesk|" $SPEC

# install all requires packages before packing (the list have got with rpmreqs anydesk)
epm install --skip-installed fontconfig glib2 libatk libcairo libfreetype libgdk-pixbuf libgio libGL libGLU libgtk+2 libICE libpango libpolkit \
    libSM libX11 libxcb libXdamage libXext libXfixes libXi libxkbfile libXmu libXrandr libXrender libXt libXtst polkit \
    libminizip libgtkglext libpangox1.0-compat

subst '1iAutoProv:no' $SPEC

remove_file usr/share/anydesk/files/init/anydesk

# put service file to the normal place
mkdir -p $BUILDROOT/etc/systemd/system/
cp $BUILDROOT/usr/share/anydesk/files/systemd/anydesk.service $BUILDROOT/etc/systemd/system/anydesk.service
remove_file /usr/share/anydesk/files/systemd/anydesk.service
pack_file /etc/systemd/system/anydesk.service


LIBDIR=/usr/lib64
[ -d $BUILDROOT$LIBDIR ] || LIBDIR=/usr/lib

# don't check lib if missed
[ ! -d $BUILDROOT$LIBDIR ] && exit

epm assure patchelf || exit
for i in $BUILDROOT$LIBDIR/anydesk/{libgdkglext-x11-1.0.*,libgtkglext-x11-1.0.*} ; do
    a= patchelf --set-rpath '$ORIGIN/' $i
done

# /usr/libexec/anydesk: library libpangox-1.0.so.0 not found
for i in $BUILDROOT/usr/libexec/anydesk ; do
{'fraction_non_alphanumeric': 0.1346153846153846, 'fraction_numerical': 0.013087606837606838, 'mean_word_length': 4.564635958395245, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '7015841', 'n_tokens_mistral': 1550, 'n_tokens_neox': 1583, 'n_words': 291}