%global debug_package %{nil} # workaround debug-id conflicts (with fx_cast) %global _build_id_links none %global __os_install_post /usr/lib/rpm/brp-compress %{nil} %global __provides_exclude_from %{_datadir}/%{name} %global __requires_exclude_from %{_datadir}/%{name} # Put here new versions of yarn #https://github.com/yarnpkg/yarn/releases %global yarn_version 1.22.19 # We need said to gulp our Machine %ifarch x86_64 %global platform 64 %else %global platform 32 %endif Name: vdhcoapp Summary: Companion application for Video DownloadHelper browser add-on Group: Applications/Internet URL: https://github.com/mi-g/vdhcoapp Version: 1.6.3 Release: %mkrel 1 License: GPLv2 Source0: https://github.com/mi-g/vdhcoapp/archive/refs/tags/%{name}-%{version}.tar.gz Patch: vdhcoapp.patch #------------------------------------- BuildRequires: git BuildRequires: wget Requires: ffmpeg %description Companion application for Video DownloadHelper browser add-on. %prep %autosetup -n vdhcoapp-%{version} -p1 %build # get yarn wget -c https://github.com/yarnpkg/yarn/releases/download/v%{yarn_version}/yarn-v%{yarn_version}.tar.gz tar xmzvf yarn-v%{yarn_version}.tar.gz -C ~ # activate yarn echo "export PATH=$PATH:~/yarn-v%{yarn_version}/bin/:~/yarn-v%{yarn_version}/lib/" >> ~/.bashrc # get nvm git clone https://github.com/nvm-sh/nvm.git ~/nvm # activate nvm echo "source ~/nvm/nvm.sh" >> ~/.bashrc source ~/.bashrc nvm install 12 nvm use 12 # Begin the build XCFLAGS="-g -O2 -fstack-protector-strong -Wformat -Werror=format-security -D_FORTIFY_SOURCE=2" XLDFLAGS="-Wl,-z,relro" ~/yarn-v%{yarn_version}/bin/yarn install #~/yarn-v%%{yarn_version}/bin/yarn add brunch #npm install # Our Firefox multilib path %ifarch x86_64 sed -i 's|/usr/lib|/usr/lib64|g' gulpfile.js sed -i 's|/usr/lib|/usr/lib64|g' app/native-autoinstall.js sed -i 's|lib/x86_64-linux-gnu|lib64|g' converter/build-apps.sh %endif # We need said a npm/yarn the path of binaries already installed... export PATH=$PATH:/usr/bin/:$PWD/node_modules/.bin/ # Now the installation gulp build-linux-%{platform} %install install -Dm755 bin/net.downloadhelper.coapp-* %{buildroot}/%{_bindir}/vdhcoapp install -Dm644 config.json %{buildroot}/%{_datadir}/vdhcoapp/config.json %pre if [ -f /usr/bin/vdhcoapp ]; then /usr/bin/vdhcoapp uninstall --system else echo 'New installation of vdhcoapp' fi %post /usr/bin/vdhcoapp install --system %files %license LICENSE.txt %{_bindir}/%{name} %{_datadir}/%{name}/config.json