diff --git a/recipes/shortwave/conda_build_config.yaml b/recipes/shortwave/conda_build_config.yaml new file mode 100644 index 0000000000000..65d4a2a9a206a --- /dev/null +++ b/recipes/shortwave/conda_build_config.yaml @@ -0,0 +1,2 @@ +libxml2_devel: + - 2.15 \ No newline at end of file diff --git a/recipes/shortwave/menu.json b/recipes/shortwave/menu.json new file mode 100644 index 0000000000000..3a24b1a444356 --- /dev/null +++ b/recipes/shortwave/menu.json @@ -0,0 +1,29 @@ +{ + "$schema": "https://schemas.conda.org/menuinst/menuinst-1-1-0.schema.json", + "menu_name": "Shortwave", + "menu_items": [ + { + "name": "Shortwave", + "description": "Listen to internet radio", + "icon": "{{ MENU_DIR }}/icon.{{ ICON_EXT }}", + "command": ["shortwave"], + "platforms": { + "linux": { + "command": ["{{ PREFIX }}/bin/shortwave", "%f"], + "DBusActivatable": true, + "StartupNotify": true, + "Categories": ["GNOME", "GTK", "Audio", "AudioVideo"], + "Keywords": ["Gradio", "Radio", "Stream", "Wave"], + "StartupWMClass": "de.haeckerfelix.Shortwave" + }, + "osx": { + "command": ["{{ PREFIX }}/bin/shortwave", "$@"], + "CFBundleVersion": "__PKG_VERSION__" + }, + "win": { + "command": ["{{ PREFIX }}/bin/shortwave", "%1"] + } + } + } + ] +} \ No newline at end of file diff --git a/recipes/shortwave/recipe.yaml b/recipes/shortwave/recipe.yaml new file mode 100644 index 0000000000000..237d98dbb7a16 --- /dev/null +++ b/recipes/shortwave/recipe.yaml @@ -0,0 +1,104 @@ +context: + name: Shortwave + version: 5.1.0 + +package: + name: ${{ name|lower }} + version: ${{ version }} + +source: + git: "https://gitlab.gnome.org/World/Shortwave.git" + branch: "pixi" +# url: "https://gitlab.gnome.org/World/${{ name }}/-/archive/${{ version }}/${{ name }}-${{ version }}.tar.gz" +# sha256: 55c5c141a564245b8f8fbe7698663c87a45a7333c2a2c56f06f811ab73b212dd + +build: + number: 0 + skip: + - linux + script: + - cargo-bundle-licenses --format yaml --output THIRDPARTY.yml + - if: win + then: + - | + set GETTEXT_DIR=%LIBRARY_PREFIX% + set CARGO_BUILD_TARGET= + meson setup %MESON_ARGS% ^ + --prefix=%LIBRARY_PREFIX% ^ + --wrap-mode=nofallback ^ + --buildtype=release ^ + builddir + ninja -v -C builddir -j %CPU_COUNT% + ninja -C builddir install -j %CPU_COUNT% + # Menuinst + - mkdir "%PREFIX%\Menu" + - copy /Y "%RECIPE_DIR%\menu.json" "%PREFIX%\Menu\%PKG_NAME%_menu.json" + - copy /Y "%RECIPE_DIR%\shortwave.ico" "%PREFIX%\Menu\icon.ico" + - if: unix + then: + - | + export GETTEXT_DIR=$PREFIX + unset CARGO_BUILD_TARGET + meson setup ${MESON_ARGS} \ + --prefix=$PREFIX \ + --wrap-mode=nofallback \ + builddir + ninja -v -C builddir -j ${CPU_COUNT} + ninja -C builddir install -j ${CPU_COUNT} + # Menuinst + - mkdir -p "${{ PREFIX }}/Menu" + - sed "s/__PKG_VERSION__/${PKG_VERSION}/g" "${{ RECIPE_DIR }}/menu.json" > "${{ PREFIX }}/Menu/${{ PKG_NAME }}_menu.json" + - if: osx + then: install -m0644 "${{ RECIPE_DIR }}/shortwave.icns" "${{ PREFIX }}/Menu/icon.icns" + - if: linux + then: install -m0644 "${{ RECIPE_DIR }}/shortwave.png" "${{ PREFIX }}/Menu/icon.png" + +requirements: + build: + - ${{ compiler('c') }} + - ${{ stdlib('c') }} + - ${{ compiler('rust') }} + - cargo-bundle-licenses + - meson + - ninja + - pkg-config + - gettext + host: + - expat + - freetype + - gst-plugins-bad + - gst-plugins-base + - gst-plugins-good + - gstreamer + - libadwaita + - sqlite + - libxml2-devel + - zlib + - if: not win + then: + - libshumate + - dbus + ignore_run_exports: + by_name: + - libzlib + - libexpat + +tests: + - package_contents: + bin: + - shortwave +about: + homepage: https://apps.gnome.org/Shortwave/ + summary: Listen to internet radio + description: | + Shortwave is an internet radio player that provides access to a station + database with over 50,000 stations. + license: GPL-3.0-or-later + license_file: + - COPYING.md + - THIRDPARTY.yml + repository: https://gitlab.gnome.org/World/Shortwave + +extra: + recipe-maintainers: + - haecker-felix diff --git a/recipes/shortwave/shortwave.icns b/recipes/shortwave/shortwave.icns new file mode 100644 index 0000000000000..70f9f09873d1a Binary files /dev/null and b/recipes/shortwave/shortwave.icns differ diff --git a/recipes/shortwave/shortwave.ico b/recipes/shortwave/shortwave.ico new file mode 100644 index 0000000000000..60762a2185a01 Binary files /dev/null and b/recipes/shortwave/shortwave.ico differ diff --git a/recipes/shortwave/shortwave.png b/recipes/shortwave/shortwave.png new file mode 100644 index 0000000000000..40b7e1d80ab19 Binary files /dev/null and b/recipes/shortwave/shortwave.png differ