#!/bin/sh
# Place your shell code here
# It will be run with two args: buildroot spec
# Name this script as package name

# You can use follow commands here: epm, subst, realpath

# subst - the same like sed -i
# realpath - print real path (resolved path) of a file

# root dir of the files
BUILDROOT="$1"
# rpm spec file
SPEC="$2"
# package name (usually the same as filename)
# PACKAGENAME="$3"
# full path to a package we repacking
ORIGINPACKAGE="$4"

# a command to run the application from cli (get from the script name by default)
#PRODUCT=<cmd>
# path to the application (/opt/$PRODUCT by default)
#PRODUCTDIR=/opt/$PRODUCT

. $(dirname $0)/common.sh


# spec additions
# subst '1iAutoReq:no' $SPEC

# fix script example
# subst "s|/usr/bin/sh|/bin/sh|" $BUILDROOT$PRODUCTDIR/cmd.bash

# copy and add file to the package
# install_file $PRODUCTDIR/aimp.desktop /usr/share/applications/$PRODUCT.desktop

# download and add file to the package
# install_file https://dashboard.snapcraft.io/site_media/appmedia/2020/04/icq_copy.png /usr/share/pixmaps/$PRODUCT.png

# remove file from the package
# remove_file /usr/share/anydesk/files/init/anydesk

# drop according lines from autogenerated requires
# filter_from_requires libpangox-1.0.so.0 libgdkglext-x11-1.0.so.0 libsomename