| 1 | name: freac |
| 2 | base: core24 |
| 3 | adopt-info: freac |
| 4 | summary: Audio converter and CD ripper |
| 5 | description: | |
| 6 | fre:ac is a free and open source audio converter. It comes with |
| 7 | an integrated tag editor and converts between various formats. |
| 8 | |
| 9 | grade: stable |
| 10 | confinement: strict |
| 11 | |
| 12 | icon: icons/freac.png |
| 13 | |
| 14 | platforms: |
| 15 | amd64: |
| 16 | arm64: |
| 17 | |
| 18 | apps: |
| 19 | freac: |
| 20 | command: bin/freac |
| 21 | desktop: share/applications/org.freac.freac.desktop |
| 22 | extensions: [ gnome ] |
| 23 | plugs: |
| 24 | - gsettings |
| 25 | - home |
| 26 | - network |
| 27 | - optical-drive |
| 28 | - audio-playback |
| 29 | - removable-media |
| 30 | |
| 31 | freaccmd: |
| 32 | command: bin/freaccmd |
| 33 | extensions: [ gnome ] |
| 34 | plugs: |
| 35 | - home |
| 36 | - network |
| 37 | - optical-drive |
| 38 | - removable-media |
| 39 | |
| 40 | parts: |
| 41 | patches: |
| 42 | source: packaging/snapcraft/patches |
| 43 | plugin: dump |
| 44 | prime: |
| 45 | - -* |
| 46 | |
| 47 | libcdio: |
| 48 | source: https://github.com/libcdio/libcdio/releases/download/2.3.0/libcdio-2.3.0.tar.bz2 |
| 49 | source-checksum: sha256/53e83d284667535a767fd2d31edad1a6701591960459df373a10f1f21e80a7ed |
| 50 | plugin: autotools |
| 51 | autotools-configure-parameters: [ --prefix=/usr, --disable-cxx, --disable-example-progs, --without-cd-drive, --without-cd-info, --without-cd-read, --without-cdda-player, --without-iso-info, --without-iso-read ] |
| 52 | prime: |
| 53 | - usr/lib/libcdio.so* |
| 54 | |
| 55 | libcdio-paranoia: |
| 56 | after: [ libcdio ] |
| 57 | source: https://github.com/libcdio/libcdio-paranoia/releases/download/release-10.2+2.0.2/libcdio-paranoia-10.2+2.0.2.tar.bz2 |
| 58 | source-checksum: sha256/186892539dedd661276014d71318c8c8f97ecb1250a86625256abd4defbf0d0c |
| 59 | plugin: autotools |
| 60 | autotools-configure-parameters: [ --prefix=/usr, --disable-cxx, --disable-example-progs ] |
| 61 | prime: |
| 62 | - usr/lib/libcdio_*.so* |
| 63 | |
| 64 | libfaad: |
| 65 | after: [ patches ] |
| 66 | source: https://github.com/knik0/faad2/archive/2.11.2.tar.gz |
| 67 | source-checksum: sha256/3fcbd305e4abd34768c62050e18ca0986f7d9c5eca343fb98275418013065c0e |
| 68 | plugin: cmake |
| 69 | cmake-parameters: [ -DCMAKE_INSTALL_PREFIX=/usr ] |
| 70 | build-environment: |
| 71 | - CFLAGS: "${CFLAGS-} -O3 -funroll-loops" |
| 72 | prime: |
| 73 | - usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libfaad.so* |
| 74 | |
| 75 | libfdk-aac: |
| 76 | source: https://github.com/mstorsjo/fdk-aac/archive/v2.0.3.tar.gz |
| 77 | source-checksum: sha256/e25671cd96b10bad896aa42ab91a695a9e573395262baed4e4a2ff178d6a3a78 |
| 78 | plugin: autotools |
| 79 | autotools-configure-parameters: [ --prefix=/usr ] |
| 80 | build-environment: |
| 81 | - CXXFLAGS: "${CXXFLAGS-} -O3 -funroll-loops" |
| 82 | override-build: | |
| 83 | autoreconf -i |
| 84 | craftctl default |
| 85 | prime: |
| 86 | - usr/lib/libfdk-aac.so* |
| 87 | |
| 88 | libflac: |
| 89 | after: [ libogg ] |
| 90 | source: https://ftp.osuosl.org/pub/xiph/releases/flac/flac-1.5.0.tar.xz |
| 91 | source-checksum: sha256/f2c1c76592a82ffff8413ba3c4a1299b6c7ab06c734dee03fd88630485c2b920 |
| 92 | plugin: autotools |
| 93 | autotools-configure-parameters: [ --prefix=/usr, --disable-cpp-libs, --disable-vsx ] |
| 94 | build-environment: |
| 95 | - CFLAGS: "${CFLAGS-} -O3 -funroll-loops" |
| 96 | prime: |
| 97 | - usr/lib/libFLAC.so* |
| 98 | |
| 99 | libmac: |
| 100 | source: https://freac.org/patches/MAC_1260_SDK.zip |
| 101 | source-checksum: sha256/0bdbc0abbb2663b7911eb04a566351335ed76dabeae8156af40d264ebbb2e0d6 |
| 102 | source-subdir: . |
| 103 | plugin: cmake |
| 104 | cmake-parameters: [ -DCMAKE_INSTALL_PREFIX=/usr ] |
| 105 | build-environment: |
| 106 | - CXXFLAGS: "${CXXFLAGS-} -O3 -funroll-loops" |
| 107 | prime: |
| 108 | - usr/lib/$CRAFT_ARCH_TRIPLET_BUILD_FOR/libMAC.so* |
| 109 | |
| 110 | libmp3lame: |
| 111 | after: [ patches ] |
| 112 | source: https://sourceforge.net/projects/lame/files/lame/3.100/lame-3.100.tar.gz |
| 113 | source-checksum: sha256/ddfe36cab873794038ae2c1210557ad34857a4b6bdc515785d1da9e175b1da1e |
| 114 | plugin: autotools |
| 115 | autotools-configure-parameters: [ --prefix=/usr, --enable-nasm, --disable-frontend ] |
| 116 | build-environment: |
| 117 | - CFLAGS: "${CFLAGS-} -O3 -funroll-loops" |
| 118 | override-build: | |
| 119 | if [ "$CRAFT_ARCH_BUILD_FOR" = "amd64" ]; then |
| 120 | patch -p0 < $CRAFT_STAGE/lame-3.100-sse-20171014.patch |
| 121 | fi |
| 122 | craftctl default |
| 123 | prime: |
| 124 | - usr/lib/libmp3lame.so* |
| 125 | |
| 126 | libmp4v2: |
| 127 | source: https://github.com/enzo1982/mp4v2/releases/download/v2.1.3/mp4v2-2.1.3.tar.bz2 |
| 128 | source-checksum: sha256/033185c17bf3c5fdd94020c95f8325be2e5356558e3913c3d6547a85dd61f7f1 |
| 129 | plugin: autotools |
| 130 | autotools-configure-parameters: [ --prefix=/usr ] |
| 131 | build-environment: |
| 132 | - CXXFLAGS: "${CXXFLAGS-} -Os" |
| 133 | prime: |
| 134 | - usr/lib/libmp4v2.so* |
| 135 | |
| 136 | libmpg123: |
| 137 | source: https://mpg123.de/download/mpg123-1.33.4.tar.bz2 |
| 138 | source-checksum: sha256/3ae8c9ff80a97bfc0e22e89fbcd74687eca4fc1db315b12607f27f01cb5a47d9 |
| 139 | plugin: make |
| 140 | build-environment: |
| 141 | - CFLAGS: "${CFLAGS-} -O3 -funroll-loops" |
| 142 | override-build: | |
| 143 | if [ "$CRAFT_ARCH_BUILD_FOR" = "i386" ]; then |
| 144 | ./configure --prefix=/usr --with-cpu=sse |
| 145 | elif [ "$CRAFT_ARCH_BUILD_FOR" = "amd64" ]; then |
| 146 | ./configure --prefix=/usr --with-cpu=x86-64 |
| 147 | elif [ "$CRAFT_ARCH_BUILD_FOR" = "armhf" ]; then |
| 148 | ./configure --prefix=/usr --with-cpu=neon |
| 149 | elif [ "$CRAFT_ARCH_BUILD_FOR" = "arm64" ]; then |
| 150 | ./configure --prefix=/usr --with-cpu=neon64 |
| 151 | else |
| 152 | ./configure --prefix=/usr |
| 153 | fi |
| 154 | craftctl default |
| 155 | prime: |
| 156 | - usr/lib/libmpg123.so* |
| 157 | |
| 158 | libogg: |
| 159 | after: [ patches ] |
| 160 | source: https://ftp.osuosl.org/pub/xiph/releases/ogg/libogg-1.3.6.tar.xz |
| 161 | source-checksum: sha256/5c8253428e181840cd20d41f3ca16557a9cc04bad4a3d04cce84808677fa1061 |
| 162 | plugin: autotools |
| 163 | autotools-configure-parameters: [ --prefix=/usr ] |
| 164 | build-environment: |
| 165 | - CFLAGS: "${CFLAGS-} -O3 -funroll-loops" |
| 166 | prime: |
| 167 | - usr/lib/libogg.so* |
| 168 | |
| 169 | libopus: |
| 170 | source: https://ftp.osuosl.org/pub/xiph/releases/opus/opus-1.6.1.tar.gz |
| 171 | source-checksum: sha256/6ffcb593207be92584df15b32466ed64bbec99109f007c82205f0194572411a1 |
| 172 | plugin: make |
| 173 | build-environment: |
| 174 | - CFLAGS: "${CFLAGS-} -O3 -funroll-loops" |
| 175 | override-build: | |
| 176 | if [ "$CRAFT_ARCH_BUILD_FOR" = "armhf" ]; then |
| 177 | ./configure --prefix=/usr --enable-float-approx --enable-osce --enable-qext --disable-intrinsics --disable-rtcd |
| 178 | else |
| 179 | ./configure --prefix=/usr --enable-float-approx --enable-osce --enable-qext |
| 180 | fi |
| 181 | craftctl default |
| 182 | prime: |
| 183 | - usr/lib/libopus.so* |
| 184 | |
| 185 | librnnoise: |
| 186 | source: https://github.com/xiph/rnnoise.git |
| 187 | source-commit: 9acc1e5a633e0961a5895a73204df24744f199b6 |
| 188 | plugin: autotools |
| 189 | autotools-configure-parameters: [ --prefix=/usr ] |
| 190 | build-environment: |
| 191 | - CFLAGS: "${CFLAGS-} -O3 -funroll-loops" |
| 192 | override-build: | |
| 193 | autoreconf -i |
| 194 | craftctl default |
| 195 | prime: |
| 196 | - usr/lib/librnnoise.so* |
| 197 | |
| 198 | libspeex: |
| 199 | source: https://ftp.osuosl.org/pub/xiph/releases/speex/speex-1.2.1.tar.gz |
| 200 | source-checksum: sha256/4b44d4f2b38a370a2d98a78329fefc56a0cf93d1c1be70029217baae6628feea |
| 201 | plugin: autotools |
| 202 | autotools-configure-parameters: [ --prefix=/usr ] |
| 203 | build-environment: |
| 204 | - CFLAGS: "${CFLAGS-} -O3 -funroll-loops" |
| 205 | prime: |
| 206 | - usr/lib/libspeex.so* |
| 207 | |
| 208 | libvorbis: |
| 209 | after: [ patches, libogg ] |
| 210 | source: https://ftp.osuosl.org/pub/xiph/releases/vorbis/libvorbis-1.3.7.tar.xz |
| 211 | source-checksum: sha256/b33cc4934322bcbf6efcbacf49e3ca01aadbea4114ec9589d1b1e9d20f72954b |
| 212 | plugin: autotools |
| 213 | autotools-configure-parameters: [ --prefix=/usr ] |
| 214 | build-environment: |
| 215 | - CFLAGS: "${CFLAGS-} -O3" |
| 216 | override-build: | |
| 217 | patch -p1 < $CRAFT_STAGE/libvorbis-1.3.7-aotuv-b6.03.patch |
| 218 | if [ "$CRAFT_ARCH_BUILD_FOR" = "amd64" ]; then |
| 219 | patch -p1 < $CRAFT_STAGE/libvorbis-1.3.7-aotuv-b6.03-lancer.patch |
| 220 | fi |
| 221 | craftctl default |
| 222 | prime: |
| 223 | - usr/lib/libvorbis*.so* |
| 224 | |
| 225 | ffmpeg: |
| 226 | source: https://ffmpeg.org/releases/ffmpeg-8.1.tar.xz |
| 227 | source-checksum: sha256/b072aed6871998cce9b36e7774033105ca29e33632be5b6347f3206898e0756a |
| 228 | plugin: autotools |
| 229 | autotools-configure-parameters: [ --prefix=/usr, --disable-autodetect, --enable-gpl, --enable-small, --enable-runtime-cpudetect, --disable-vsx ] |
| 230 | build-packages: |
| 231 | - nasm |
| 232 | prime: |
| 233 | - usr/bin/ffmpeg |
| 234 | |
| 235 | icons: |
| 236 | plugin: nil |
| 237 | stage-packages: |
| 238 | - gnome-icon-theme |
| 239 | override-prime: | |
| 240 | mkdir -p share/icons/gnome/32x32/status |
| 241 | cp $CRAFT_STAGE/usr/share/icons/gnome/32x32/status/dialog-error.png share/icons/gnome/32x32/status |
| 242 | cp $CRAFT_STAGE/usr/share/icons/gnome/32x32/status/dialog-information.png share/icons/gnome/32x32/status |
| 243 | cp $CRAFT_STAGE/usr/share/icons/gnome/32x32/status/dialog-question.png share/icons/gnome/32x32/status |
| 244 | cp $CRAFT_STAGE/usr/share/icons/gnome/32x32/status/dialog-warning.png share/icons/gnome/32x32/status |
| 245 | |
| 246 | smooth: |
| 247 | after: [ patches ] |
| 248 | source: https://github.com/enzo1982/smooth.git |
| 249 | plugin: make |
| 250 | make-parameters: [ prefix= ] |
| 251 | build-environment: |
| 252 | - CXXFLAGS: "${CXXFLAGS-} -g0 -Os -fno-rtti -fno-exceptions" |
| 253 | build-packages: |
| 254 | - libbz2-dev |
| 255 | - libcurl4-gnutls-dev |
| 256 | - libfribidi-dev |
| 257 | - libjpeg8-dev |
| 258 | - libxml2-dev |
| 259 | stage-packages: |
| 260 | - libcurl3t64-gnutls |
| 261 | - libfribidi0 |
| 262 | |
| 263 | boca: |
| 264 | after: [ libcdio-paranoia, smooth ] |
| 265 | source: https://github.com/enzo1982/BoCA.git |
| 266 | plugin: make |
| 267 | make-parameters: [ prefix= ] |
| 268 | build-environment: |
| 269 | - CXXFLAGS: "${CXXFLAGS-} -g0 -Os -fno-rtti -fno-exceptions" |
| 270 | override-build: | |
| 271 | patch -p1 < $CRAFT_STAGE/boca-1.1.8-pre-snap.patch |
| 272 | craftctl default |
| 273 | build-packages: |
| 274 | - libexpat1-dev |
| 275 | - libpulse-dev |
| 276 | - liburiparser-dev |
| 277 | stage-packages: |
| 278 | - librubberband2 |
| 279 | - liburiparser1 |
| 280 | - musepack-tools |
| 281 | - wavpack |
| 282 | |
| 283 | freac: |
| 284 | after: [ boca ] |
| 285 | source: https://github.com/enzo1982/freac.git |
| 286 | plugin: make |
| 287 | make-parameters: [ prefix= ] |
| 288 | build-environment: |
| 289 | - CXXFLAGS: "${CXXFLAGS-} -g0 -Os -fno-rtti -fno-exceptions -DFREAC_DATE=\\\\\\\"`date +\"%Y%m%d\"`\\\\\\\"" |
| 290 | override-pull: | |
| 291 | craftctl default |
| 292 | craftctl set version=$(echo 1.1.7~`date +"%Y%m%d"`) |
| 293 | sed -i -e 's|Icon=org.freac.freac|Icon=${SNAP}/share/icons/hicolor/128x128/apps/org.freac.freac.png|g' metadata/org.freac.freac.desktop |
| 294 | override-build: | |
| 295 | patch -p1 < $CRAFT_STAGE/freac-1.1.6-pre-snap.patch |
| 296 | craftctl default |
| 297 | build-packages: |
| 298 | - libudev-dev |