Commit b9ee1528 authored by Vitaly Lipatov's avatar Vitaly Lipatov

epm repack: implement add_requires and use it

parent b755b780
...@@ -12,8 +12,8 @@ PRODUCTDIR=/opt/$PRODUCT ...@@ -12,8 +12,8 @@ PRODUCTDIR=/opt/$PRODUCT
subst '1iAutoReq:no' $SPEC subst '1iAutoReq:no' $SPEC
subst '1iAutoProv:no' $SPEC subst '1iAutoProv:no' $SPEC
subst '1iRequires:/usr/bin/wine' $SPEC add_requires '/usr/bin/wine'
subst '1iRequires:/bin/sh' $SPEC add_requires '/bin/sh'
add_bin_link_command $PRODUCT $PRODUCTDIR/aimp.bash add_bin_link_command $PRODUCT $PRODUCTDIR/aimp.bash
......
...@@ -231,6 +231,11 @@ fix_chrome_sandbox() ...@@ -231,6 +231,11 @@ fix_chrome_sandbox()
chmod -v 4711 "$BUILDROOT$sandbox" chmod -v 4711 "$BUILDROOT$sandbox"
} }
add_requires()
{
subst "1iRequires: $*" $SPEC
}
filter_from_requires() filter_from_requires()
{ {
local i local i
......
...@@ -4,8 +4,9 @@ ...@@ -4,8 +4,9 @@
BUILDROOT="$1" BUILDROOT="$1"
SPEC="$2" SPEC="$2"
REQUIRES="mono-full,libgtk-sharp2" . $(dirname $0)/common.sh
subst "s|^\(Name: .*\)$|# Converted from original package requires\nRequires:$REQUIRES\n\1|g" $SPEC
add_requires mono-full libgtk-sharp2
subst '1iBuildRequires: rpm-build-python3' $SPEC subst '1iBuildRequires: rpm-build-python3' $SPEC
subst '1i%add_python3_path /usr/lib/duplicati' $SPEC subst '1i%add_python3_path /usr/lib/duplicati' $SPEC
......
...@@ -21,4 +21,4 @@ PRODUCT=gitlab-runner ...@@ -21,4 +21,4 @@ PRODUCT=gitlab-runner
subst '1iAutoReq:no' $SPEC subst '1iAutoReq:no' $SPEC
subst '1iAutoProv:no' $SPEC subst '1iAutoProv:no' $SPEC
subst '1iRequires:curl git tar' $SPEC add_requires curl git tar
...@@ -6,7 +6,7 @@ SPEC="$2" ...@@ -6,7 +6,7 @@ SPEC="$2"
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
subst '1iRequires: python3-module-PyPDF3' $SPEC add_requires python3-module-PyPDF3
subst '1iAutoProv: no' $SPEC subst '1iAutoProv: no' $SPEC
......
...@@ -5,4 +5,6 @@ SPEC="$2" ...@@ -5,4 +5,6 @@ SPEC="$2"
PRODUCT=minecraft-launcher PRODUCT=minecraft-launcher
subst '1iRequires: java-openjdk at-spi2-atk file GConf glib2 grep libatk libat-spi2-core libalsa libcairo libcups libdbus libdrm libexpat libgbm libgdk-pixbuf libgio libgtk+3 libnspr libnss libpango libX11 libxcb libXcomposite libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender libXtst sed which xdg-utils xprop libsecret' $SPEC . $(dirname $0)/common.sh
add_requires java-openjdk at-spi2-atk file GConf glib2 grep libatk libat-spi2-core libalsa libcairo libcups libdbus libdrm libexpat libgbm libgdk-pixbuf libgio libgtk+3 libnspr libnss libpango libX11 libxcb libXcomposite libXcursor libXdamage libXext libXfixes libXi libXrandr libXrender libXtst sed which xdg-utils xprop libsecret
...@@ -12,8 +12,7 @@ PRODUCTDIR=/opt/onlyoffice ...@@ -12,8 +12,7 @@ PRODUCTDIR=/opt/onlyoffice
# $ rpm -qf /usr/lib64/LibreOffice/share/fonts/truetype/opens___.ttf # $ rpm -qf /usr/lib64/LibreOffice/share/fonts/truetype/opens___.ttf
#LibreOffice-common-7.0.1.2-alt1.0.p9.x86_64 #LibreOffice-common-7.0.1.2-alt1.0.p9.x86_64
REQUIRES="fonts-ttf-liberation, fonts-ttf-dejavu" add_requires fonts-ttf-liberation fonts-ttf-dejavu
subst "s|^\(Name: .*\)$|# Converted from original package requires\nRequires:$REQUIRES\n\1|g" $SPEC
# ignore embedded libs # ignore embedded libs
for i in $BUILDROOT/opt/onlyoffice/desktopeditors/lib* ; do for i in $BUILDROOT/opt/onlyoffice/desktopeditors/lib* ; do
......
...@@ -36,7 +36,7 @@ pack_file /usr/share/applications/$PRODUCT.desktop ...@@ -36,7 +36,7 @@ pack_file /usr/share/applications/$PRODUCT.desktop
# https://github.com/Castro-Fidel/PortWINE/pull/36 # https://github.com/Castro-Fidel/PortWINE/pull/36
subst 's|elif|else|' $BUILDROOT$PRODUCTDIR/data_from_portwine/scripts/portwine_db/WorldOfTanksEnCoreLauncher subst 's|elif|else|' $BUILDROOT$PRODUCTDIR/data_from_portwine/scripts/portwine_db/WorldOfTanksEnCoreLauncher
subst '1iRequires:bubblewrap cabextract curl gamemode icoutils libvulkan1 vulkan-tools wget zenity zstd libd3d libMesaOpenCL' $SPEC add_requires bubblewrap cabextract curl gamemode icoutils libvulkan1 vulkan-tools wget zenity zstd libd3d libMesaOpenCL
epm install -skip-installed vulkan-tools epm install -skip-installed vulkan-tools
filter_from_requires xneur filter_from_requires xneur
......
...@@ -8,6 +8,6 @@ PRODUCTDIR=/opt/PortProton ...@@ -8,6 +8,6 @@ PRODUCTDIR=/opt/PortProton
. $(dirname $0)/common.sh . $(dirname $0)/common.sh
subst '1iRequires:bubblewrap cabextract curl gamemode icoutils libvulkan1 vulkan-tools wget zenity zstd libd3d libMesaOpenCL' $SPEC add_requires bubblewrap cabextract curl gamemode icoutils libvulkan1 vulkan-tools wget zenity zstd libd3d libMesaOpenCL
filter_from_requires xneur filter_from_requires xneur
...@@ -8,7 +8,7 @@ SPEC="$2" ...@@ -8,7 +8,7 @@ SPEC="$2"
subst '1iAutoProv:no' $SPEC subst '1iAutoProv:no' $SPEC
subst '1iRequires: libpcsclite libudev0' $SPEC add_requires libpcsclite libudev0
if [ "$(epm print info -a)" = "x86_64" ] ; then if [ "$(epm print info -a)" = "x86_64" ] ; then
remove_file /usr/share/sphinx/gui/spnxreader/libspnxreader_i386.so remove_file /usr/share/sphinx/gui/spnxreader/libspnxreader_i386.so
......
...@@ -26,6 +26,4 @@ for i in 16 22 24 32 48 64 128 256 ; do ...@@ -26,6 +26,4 @@ for i in 16 22 24 32 48 64 128 256 ; do
cp $BUILDROOT/$LIBDIR/$PRODUCT/icons/spotify-linux-$i.png $BUILDROOT/usr/share/icons/hicolor/${i}x${i}/apps/spotify-client.png cp $BUILDROOT/$LIBDIR/$PRODUCT/icons/spotify-linux-$i.png $BUILDROOT/usr/share/icons/hicolor/${i}x${i}/apps/spotify-client.png
done done
#subst "s|^\(Name: .*\)$|# Converted from original package requires\nRequires:$REQUIRES\n\1|g" $SPEC
epm install --skip-installed libcurl4-gnutls epm install --skip-installed libcurl4-gnutls
...@@ -14,9 +14,8 @@ if [ "$(epm print info -a)" = "x86_64" ] ; then ...@@ -14,9 +14,8 @@ if [ "$(epm print info -a)" = "x86_64" ] ; then
subst "s|.*script/libdepend.*||" $SPEC subst "s|.*script/libdepend.*||" $SPEC
fi fi
# comment out libexo (we have libexo-gtk3 only now) # commented out libexo (we have libexo-gtk3 only now)
REQUIRES="xdg-utils,libdbus,libqt5-core,libqt5-dbus,libqt5-gui,libqt5-network,libqt5-qml,libqt5-quick,libqt5-webkit,libqt5-webkitwidgets,libqt5-widgets,libqt5-x11extras,libminizip" add_requires xdg-utils libdbus libqt5-core libqt5-dbus libqt5-gui libqt5-network libqt5-qml libqt5-quick libqt5-webkit libqt5-webkitwidgets libqt5-widgets libqt5-x11extras libminizip
subst "s|^\(Name: .*\)$|# Converted from original package requires\nRequires:$REQUIRES\n\1|g" $SPEC
# TODO: check if we missed something from it # TODO: check if we missed something from it
rm -rf $BUILDROOT/opt/teamviewer/tv_bin/script/teamviewer_setup rm -rf $BUILDROOT/opt/teamviewer/tv_bin/script/teamviewer_setup
......
...@@ -6,4 +6,6 @@ SPEC="$2" ...@@ -6,4 +6,6 @@ SPEC="$2"
PRODUCT=vivaldi-snapshot-codecs-ffmpeg-extra PRODUCT=vivaldi-snapshot-codecs-ffmpeg-extra
subst '1iRequires:vivaldi-snapshot' $SPEC . $(dirname $0)/common.sh
add_requires vivaldi-snapshot
...@@ -6,4 +6,6 @@ SPEC="$2" ...@@ -6,4 +6,6 @@ SPEC="$2"
PRODUCT=vivaldi-stable-codecs-ffmpeg-extra PRODUCT=vivaldi-stable-codecs-ffmpeg-extra
subst '1iRequires:vivaldi-stable' $SPEC . $(dirname $0)/common.sh
add_requires vivaldi-stable
...@@ -6,4 +6,6 @@ SPEC="$2" ...@@ -6,4 +6,6 @@ SPEC="$2"
PRODUCT=yandex-browser-stable-codecs-ffmpeg-extra PRODUCT=yandex-browser-stable-codecs-ffmpeg-extra
subst '1iRequires:yandex-browser-beta' $SPEC . $(dirname $0)/common.sh
add_requires yandex-browser-beta
...@@ -13,7 +13,7 @@ PRODUCTDIR=/opt/yandex/browser-beta ...@@ -13,7 +13,7 @@ PRODUCTDIR=/opt/yandex/browser-beta
subst '1iConflicts: yandex-browser-stable' $SPEC subst '1iConflicts: yandex-browser-stable' $SPEC
subst '10iProvides: yandex-browser = %{version}' $SPEC subst '10iProvides: yandex-browser = %{version}' $SPEC
subst '1iRequires:fonts-ttf-google-noto-emoji-color' $SPEC add_requires fonts-ttf-google-noto-emoji-color
set_alt_alternatives 65 set_alt_alternatives 65
......
...@@ -6,4 +6,6 @@ SPEC="$2" ...@@ -6,4 +6,6 @@ SPEC="$2"
PRODUCT=yandex-browser-stable-codecs-ffmpeg-extra PRODUCT=yandex-browser-stable-codecs-ffmpeg-extra
subst '1iRequires:yandex-browser-stable' $SPEC . $(dirname $0)/common.sh
add_requires yandex-browser-stable
...@@ -13,7 +13,7 @@ PRODUCTDIR=/opt/yandex/browser ...@@ -13,7 +13,7 @@ PRODUCTDIR=/opt/yandex/browser
subst '1iConflicts: yandex-browser-beta' $SPEC subst '1iConflicts: yandex-browser-beta' $SPEC
subst '10iProvides: yandex-browser = %version' $SPEC subst '10iProvides: yandex-browser = %version' $SPEC
subst '1iRequires:fonts-ttf-google-noto-emoji-color' $SPEC add_requires fonts-ttf-google-noto-emoji-color
set_alt_alternatives 65 set_alt_alternatives 65
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment