mirror of
https://github.com/strawberrymusicplayer/strawberry
synced 2025-02-05 03:47:51 +01:00
Fix RPM build
This commit is contained in:
parent
eb5d72a940
commit
e32ed02a24
4
.gitignore
vendored
4
.gitignore
vendored
@ -34,6 +34,10 @@ Thumbs.db
|
|||||||
*.rc
|
*.rc
|
||||||
/.qmake.cache
|
/.qmake.cache
|
||||||
/.qmake.stash
|
/.qmake.stash
|
||||||
|
*.spec
|
||||||
|
*.nsi
|
||||||
|
*.plist
|
||||||
|
maketarball.sh
|
||||||
|
|
||||||
# qtcreator generated files
|
# qtcreator generated files
|
||||||
*.pro.user*
|
*.pro.user*
|
||||||
|
@ -1,12 +1,28 @@
|
|||||||
set(RPMBUILD_DIR ~/rpmbuild CACHE STRING "Rpmbuild directory, for the rpm target")
|
find_program(LSB_RELEASE_EXEC lsb_release)
|
||||||
set(MOCK_COMMAND mock CACHE STRING "Command to use for running mock")
|
execute_process(COMMAND ${LSB_RELEASE_EXEC} -is
|
||||||
set(MOCK_CHROOT suse-x86_64 CACHE STRING "Chroot to use when building an rpm with mock")
|
OUTPUT_VARIABLE LSB_RELEASE_ID_SHORT
|
||||||
set(RPM_DISTRO suse CACHE STRING "Suffix of the rpm file")
|
OUTPUT_STRIP_TRAILING_WHITESPACE
|
||||||
set(RPM_ARCH x86_64 CACHE STRING "Architecture of the rpm file")
|
|
||||||
|
|
||||||
add_custom_target(rpm
|
|
||||||
COMMAND ${CMAKE_SOURCE_DIR}/dist/scripts/maketarball.sh
|
|
||||||
COMMAND ${CMAKE_COMMAND} -E copy strawberry-${STRAWBERRY_VERSION_PACKAGE}.tar.xz ${RPMBUILD_DIR}/SOURCES/
|
|
||||||
COMMAND rpmbuild -bs ${CMAKE_SOURCE_DIR}/dist/rpm/strawberry.spec
|
|
||||||
COMMAND rpmbuild -bb ${CMAKE_SOURCE_DIR}/dist/rpm/strawberry.spec
|
|
||||||
)
|
)
|
||||||
|
|
||||||
|
if (LSB_RELEASE_EXEC)
|
||||||
|
set(RPMBUILD_DIR ~/rpmbuild CACHE STRING "Rpmbuild directory, for the rpm target")
|
||||||
|
set(RPM_ARCH x86_64 CACHE STRING "Architecture of the rpm file")
|
||||||
|
if (${LSB_RELEASE_ID_SHORT} STREQUAL "openSUSE")
|
||||||
|
set(RPM_DISTRO opensuse CACHE STRING "Suffix of the rpm file")
|
||||||
|
add_custom_target(rpm
|
||||||
|
COMMAND ${CMAKE_SOURCE_DIR}/dist/scripts/maketarball.sh
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy strawberry-${STRAWBERRY_VERSION_PACKAGE}.tar.xz ${RPMBUILD_DIR}/SOURCES/
|
||||||
|
COMMAND rpmbuild -bs ${CMAKE_SOURCE_DIR}/dist/opensuse/strawberry.spec
|
||||||
|
COMMAND rpmbuild -bb ${CMAKE_SOURCE_DIR}/dist/opensuse/strawberry.spec
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
if (${LSB_RELEASE_ID_SHORT} STREQUAL "Fedora")
|
||||||
|
set(RPM_DISTRO fedora CACHE STRING "Suffix of the rpm file")
|
||||||
|
add_custom_target(rpm
|
||||||
|
COMMAND ${CMAKE_SOURCE_DIR}/dist/scripts/maketarball.sh
|
||||||
|
COMMAND ${CMAKE_COMMAND} -E copy strawberry-${STRAWBERRY_VERSION_PACKAGE}.tar.xz ${RPMBUILD_DIR}/SOURCES/
|
||||||
|
COMMAND rpmbuild -bs ${CMAKE_SOURCE_DIR}/dist/fedora/strawberry.spec
|
||||||
|
COMMAND rpmbuild -bb ${CMAKE_SOURCE_DIR}/dist/fedora/strawberry.spec
|
||||||
|
)
|
||||||
|
endif()
|
||||||
|
endif()
|
||||||
|
4
dist/CMakeLists.txt
vendored
4
dist/CMakeLists.txt
vendored
@ -1,9 +1,11 @@
|
|||||||
set(ENV{LC_ALL} "en_US.utf8")
|
set(ENV{LC_ALL} "en_US.utf8")
|
||||||
execute_process(COMMAND date "+%a %b %d %Y" OUTPUT_VARIABLE RPM_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
execute_process(COMMAND date "+%a %b %d %Y" OUTPUT_VARIABLE RPM_DATE OUTPUT_STRIP_TRAILING_WHITESPACE)
|
||||||
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/rpm/strawberry.spec.in ${CMAKE_CURRENT_SOURCE_DIR}/rpm/strawberry.spec @ONLY)
|
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/maketarball.sh.in ${CMAKE_CURRENT_SOURCE_DIR}/scripts/maketarball.sh @ONLY)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/scripts/maketarball.sh.in ${CMAKE_CURRENT_SOURCE_DIR}/scripts/maketarball.sh @ONLY)
|
||||||
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/opensuse/strawberry.spec.in ${CMAKE_CURRENT_SOURCE_DIR}/opensuse/strawberry.spec @ONLY)
|
||||||
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/fedora/strawberry.spec.in ${CMAKE_CURRENT_SOURCE_DIR}/fedora/strawberry.spec @ONLY)
|
||||||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/macos/Info.plist.in ${CMAKE_CURRENT_SOURCE_DIR}/macos/Info.plist)
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/macos/Info.plist.in ${CMAKE_CURRENT_SOURCE_DIR}/macos/Info.plist)
|
||||||
|
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/windows/strawberry.nsi.in ${CMAKE_CURRENT_SOURCE_DIR}/windows/strawberry.nsi @ONLY)
|
||||||
|
|
||||||
if (UNIX AND NOT APPLE)
|
if (UNIX AND NOT APPLE)
|
||||||
install(FILES ../data/icons/48x48/strawberry.png DESTINATION share/icons/hicolor/48x48/apps/)
|
install(FILES ../data/icons/48x48/strawberry.png DESTINATION share/icons/hicolor/48x48/apps/)
|
||||||
|
113
dist/fedora/strawberry.spec.in
vendored
Normal file
113
dist/fedora/strawberry.spec.in
vendored
Normal file
@ -0,0 +1,113 @@
|
|||||||
|
Name: strawberry
|
||||||
|
Version: @STRAWBERRY_VERSION_RPM_V@
|
||||||
|
Release: @STRAWBERRY_VERSION_RPM_R@.@RPM_DISTRO@
|
||||||
|
Summary: A audio player and music collection organiser
|
||||||
|
|
||||||
|
Group: Applications/Multimedia
|
||||||
|
License: GPL-3.0+
|
||||||
|
URL: http://www.strawbs.org/
|
||||||
|
Source0: %{name}-@STRAWBERRY_VERSION_PACKAGE@.tar.xz
|
||||||
|
|
||||||
|
BuildRequires: boost-devel
|
||||||
|
BuildRequires: cmake
|
||||||
|
BuildRequires: desktop-file-utils
|
||||||
|
BuildRequires: gcc-c++
|
||||||
|
BuildRequires: hicolor-icon-theme
|
||||||
|
BuildRequires: liblastfm-qt5-devel
|
||||||
|
BuildRequires: make
|
||||||
|
BuildRequires: git
|
||||||
|
BuildRequires: pkgconfig
|
||||||
|
BuildRequires: pkgconfig(glib-2.0)
|
||||||
|
BuildRequires: pkgconfig(gio-2.0)
|
||||||
|
BuildRequires: pkgconfig(gio-unix-2.0)
|
||||||
|
BuildRequires: pkgconfig(gthread-2.0)
|
||||||
|
BuildRequires: pkgconfig(dbus-1)
|
||||||
|
BuildRequires: pkgconfig(alsa)
|
||||||
|
BuildRequires: pkgconfig(protobuf)
|
||||||
|
BuildRequires: pkgconfig(sqlite3) >= 3.7
|
||||||
|
BuildRequires: pkgconfig(taglib) >= 1.11
|
||||||
|
BuildRequires: pkgconfig(Qt5Core)
|
||||||
|
BuildRequires: pkgconfig(Qt5Gui)
|
||||||
|
BuildRequires: pkgconfig(Qt5Widgets)
|
||||||
|
BuildRequires: pkgconfig(Qt5Concurrent)
|
||||||
|
BuildRequires: pkgconfig(Qt5Sql)
|
||||||
|
BuildRequires: pkgconfig(Qt5Network)
|
||||||
|
BuildRequires: pkgconfig(Qt5Xml)
|
||||||
|
BuildRequires: pkgconfig(Qt5X11Extras)
|
||||||
|
BuildRequires: pkgconfig(Qt5DBus)
|
||||||
|
BuildRequires: pkgconfig(Qt5OpenGL)
|
||||||
|
BuildRequires: pkgconfig(gstreamer-1.0)
|
||||||
|
BuildRequires: pkgconfig(gstreamer-app-1.0)
|
||||||
|
BuildRequires: pkgconfig(gstreamer-audio-1.0)
|
||||||
|
BuildRequires: pkgconfig(gstreamer-base-1.0)
|
||||||
|
BuildRequires: pkgconfig(gstreamer-tag-1.0)
|
||||||
|
BuildRequires: pkgconfig(libpulse)
|
||||||
|
BuildRequires: pkgconfig(libcdio)
|
||||||
|
BuildRequires: pkgconfig(libchromaprint)
|
||||||
|
BuildRequires: pkgconfig(libgpod-1.0)
|
||||||
|
BuildRequires: pkgconfig(libmtp)
|
||||||
|
BuildRequires: pkgconfig(libnotify)
|
||||||
|
BuildRequires: pkgconfig(libudf)
|
||||||
|
|
||||||
|
%description
|
||||||
|
Strawberry is a audio player and music collection organizer.
|
||||||
|
It is a fork of Clementine. The name is inspired by the band Strawbs.
|
||||||
|
|
||||||
|
Features:
|
||||||
|
* Play and organize music
|
||||||
|
* Native desktop notifications
|
||||||
|
* Playlists in multiple formats
|
||||||
|
* Edit tags on music files
|
||||||
|
* Fetch tags from MusicBrainz
|
||||||
|
* Album cover art from Lastfm, Musicbrainz, Discogs and Amazon
|
||||||
|
* Transfer music to iPod, iPhone, MTP or mass-storage USB player
|
||||||
|
* Support for multiple backends
|
||||||
|
|
||||||
|
%prep
|
||||||
|
%setup -qn %{name}-@STRAWBERRY_VERSION_PACKAGE@
|
||||||
|
|
||||||
|
%build
|
||||||
|
|
||||||
|
%if 0%{?fedora} > 27
|
||||||
|
# workaround FTBFS
|
||||||
|
export CXXFLAGS="%{optflags} -fpermissive"
|
||||||
|
%endif
|
||||||
|
|
||||||
|
mkdir %{_target_platform}
|
||||||
|
pushd %{_target_platform}
|
||||||
|
|
||||||
|
%{cmake} \
|
||||||
|
-DBUILD_WERROR:BOOL=OFF \
|
||||||
|
-DCMAKE_BUILD_TYPE:STRING=Release \
|
||||||
|
..
|
||||||
|
popd
|
||||||
|
|
||||||
|
%make_build -C %{_target_platform}
|
||||||
|
|
||||||
|
%install
|
||||||
|
make install DESTDIR=%{buildroot} -C %{_target_platform}
|
||||||
|
|
||||||
|
%check
|
||||||
|
desktop-file-validate %{buildroot}%{_datadir}/applications/strawberry.desktop
|
||||||
|
pushd %{_target_platform}
|
||||||
|
popd
|
||||||
|
|
||||||
|
%clean
|
||||||
|
|
||||||
|
%files
|
||||||
|
%defattr(-,root,root,-)
|
||||||
|
%doc
|
||||||
|
%{_bindir}/strawberry
|
||||||
|
%{_bindir}/strawberry-tagreader
|
||||||
|
%{_datadir}/applications/strawberry.desktop
|
||||||
|
%{_datadir}/icons/hicolor/48x48/apps/strawberry.png
|
||||||
|
%{_datadir}/icons/hicolor/64x64/apps/strawberry.png
|
||||||
|
%{_datadir}/icons/hicolor/128x128/apps/strawberry.png
|
||||||
|
%{_datadir}/icons/hicolor/scalable/apps/strawberry.svg
|
||||||
|
%{_mandir}/man1/%{name}.1%{?ext_man}
|
||||||
|
%{_mandir}/man1/%{name}-tagreader.1%{?ext_man}
|
||||||
|
|
||||||
|
%changelog
|
||||||
|
* @RPM_DATE@ Jonas Kvinge <jonas@strawbs.net> - @STRAWBERRY_VERSION_RPM_V@
|
||||||
|
- Version @STRAWBERRY_VERSION_PACKAGE@
|
||||||
|
|
@ -9,7 +9,11 @@ URL: http://www.strawbs.org/
|
|||||||
Source0: %{name}-@STRAWBERRY_VERSION_PACKAGE@.tar.xz
|
Source0: %{name}-@STRAWBERRY_VERSION_PACKAGE@.tar.xz
|
||||||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
|
||||||
|
|
||||||
|
%if 0%{?suse_version} > 1325
|
||||||
BuildRequires: libboost_headers-devel
|
BuildRequires: libboost_headers-devel
|
||||||
|
%else
|
||||||
|
BuildRequires: boost-devel
|
||||||
|
%endif
|
||||||
BuildRequires: cmake
|
BuildRequires: cmake
|
||||||
BuildRequires: desktop-file-utils
|
BuildRequires: desktop-file-utils
|
||||||
BuildRequires: gcc-c++
|
BuildRequires: gcc-c++
|
||||||
@ -99,3 +103,4 @@ make clean
|
|||||||
%changelog
|
%changelog
|
||||||
* @RPM_DATE@ Jonas Kvinge <jonas@strawbs.net> - @STRAWBERRY_VERSION_RPM_V@
|
* @RPM_DATE@ Jonas Kvinge <jonas@strawbs.net> - @STRAWBERRY_VERSION_RPM_V@
|
||||||
- Version @STRAWBERRY_VERSION_PACKAGE@
|
- Version @STRAWBERRY_VERSION_PACKAGE@
|
||||||
|
|
@ -1,10 +1,10 @@
|
|||||||
!define PRODUCT_NAME "Strawberry"
|
!define PRODUCT_NAME "Strawberry"
|
||||||
!define PRODUCT_PUBLISHER "Strawberry"
|
!define PRODUCT_PUBLISHER "Strawberry"
|
||||||
!define PRODUCT_VERSION_MAJOR 0
|
!define PRODUCT_VERSION_MAJOR @STRAWBERRY_VERSION_MAJOR@
|
||||||
!define PRODUCT_VERSION_MINOR 2
|
!define PRODUCT_VERSION_MINOR @STRAWBERRY_VERSION_MINOR@
|
||||||
!define PRODUCT_VERSION_PATCH 1
|
!define PRODUCT_VERSION_PATCH @STRAWBERRY_VERSION_PATCH@
|
||||||
!define PRODUCT_DISPLAY_VERSION "0.2.1"
|
!define PRODUCT_DISPLAY_VERSION "@STRAWBERRY_VERSION_PACKAGE@"
|
||||||
!define PRODUCT_DISPLAY_VERSION_SHORT "0.2.1"
|
!define PRODUCT_DISPLAY_VERSION_SHORT "@STRAWBERRY_VERSION_PACKAGE@"
|
||||||
!define PRODUCT_WEB_SITE "http://www.strawbs.org/"
|
!define PRODUCT_WEB_SITE "http://www.strawbs.org/"
|
||||||
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
|
!define PRODUCT_UNINST_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall\${PRODUCT_NAME}"
|
||||||
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
|
!define PRODUCT_UNINST_ROOT_KEY "HKLM"
|
||||||
@ -48,7 +48,7 @@ SetCompressor /SOLID lzma
|
|||||||
!insertmacro MUI_LANGUAGE "English" ;first language is the default language
|
!insertmacro MUI_LANGUAGE "English" ;first language is the default language
|
||||||
|
|
||||||
Name "${PRODUCT_NAME}"
|
Name "${PRODUCT_NAME}"
|
||||||
OutFile "${PRODUCT_NAME}Setup-0.2.1.exe"
|
OutFile "${PRODUCT_NAME}Setup-${PRODUCT_DISPLAY_VERSION}.exe"
|
||||||
InstallDir "${PRODUCT_INSTALL_DIR}"
|
InstallDir "${PRODUCT_INSTALL_DIR}"
|
||||||
|
|
||||||
; Get the path where Strawberry was installed previously and set it as default path
|
; Get the path where Strawberry was installed previously and set it as default path
|
0
src/analyzer/analyzerbase.cpp
Executable file → Normal file
0
src/analyzer/analyzerbase.cpp
Executable file → Normal file
Loading…
x
Reference in New Issue
Block a user