Skip to content

Commit

Permalink
Cmake (#164)
Browse files Browse the repository at this point in the history
  • Loading branch information
olegantonyan authored Dec 18, 2024
1 parent e8d643a commit f6b2a32
Show file tree
Hide file tree
Showing 921 changed files with 502 additions and 872 deletions.
8 changes: 4 additions & 4 deletions .github/aur/PKGBUILD_Qt5.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pkgdesc='Music player for the large local collections (Qt5 version)'
arch=('x86_64')
url="https://github.com/olegantonyan/mpz"
license=('GPL3')
depends=('qt5-multimedia' 'qt5-x11extras' 'hicolor-icon-theme' 'yaml-cpp' 'taglib')
depends=('cmake' 'qt5-multimedia' 'qt5-x11extras' 'hicolor-icon-theme' 'yaml-cpp' 'taglib')
provides=('mpz')
conflicts=('mpz')
source=("$pkgname-$pkgver-$pkgrel.zip::<%= source %>")
Expand All @@ -20,13 +20,13 @@ build() {
rm -rf build
mkdir build
cd build
qmake-qt5 CONFIG+=release DEFINES+=USE_SYSTEM_TAGLIB DEFINES+=USE_SYSTEM_YAMLCPP ..
make
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DUSE_SYSTEM_TAGLIB=ON -DUSE_SYSTEM_YAMLCPP=ON -DUSE_QT5 ..
cmake --build .
}

package() {
cd mpz-<%= commit_hash %>

cd build
make install INSTALL_ROOT=$pkgdir
DESTDIR="$pkgdir" cmake --install .
}
8 changes: 4 additions & 4 deletions .github/aur/PKGBUILD_Qt6.erb
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ pkgdesc='Music player for the large local collections'
arch=('x86_64')
url="https://github.com/olegantonyan/mpz"
license=('GPL3')
depends=('qt6-multimedia' 'hicolor-icon-theme' 'yaml-cpp' 'taglib')
depends=('cmake' 'qt6-multimedia' 'hicolor-icon-theme' 'yaml-cpp' 'taglib')
provides=('<%= pkgname %>')
source=("$pkgname-$pkgver-$pkgrel.zip::<%= source %>")
sha256sums=('<%= sha256sums %>')
Expand All @@ -19,13 +19,13 @@ build() {
rm -rf build
mkdir build
cd build
qmake6 CONFIG+=release DEFINES+=USE_SYSTEM_TAGLIB DEFINES+=USE_SYSTEM_YAMLCPP ..
make
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr -DUSE_SYSTEM_TAGLIB=ON -DUSE_SYSTEM_YAMLCPP=ON ..
cmake --build .
}

package() {
cd mpz-<%= commit_hash %>

cd build
make install INSTALL_ROOT=$pkgdir
DESTDIR="$pkgdir" cmake --install .
}
1 change: 1 addition & 0 deletions .github/aur/SRCINFO_Qt5.erb
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@ pkgbase = <%= pkgname %>
depends = hicolor-icon-theme
depends = yaml-cpp
depends = taglib
depends = cmake
provides = mpz
conflicts = mpz
source = <%= pkgname %>-<%= pkgver %>-<%= pkgrel %>.zip::<%= source %>
Expand Down
1 change: 1 addition & 0 deletions .github/aur/SRCINFO_Qt6.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ pkgbase = <%= pkgname %>
depends = hicolor-icon-theme
depends = yaml-cpp
depends = taglib
depends = cmake
provides = <%= pkgname %>
source = <%= pkgname %>-<%= pkgver %>-<%= pkgrel %>.zip::<%= source %>
sha256sums = <%= sha256sums %>
Expand Down
2 changes: 1 addition & 1 deletion .github/release-aur-github-action.rb
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@

aur_repo = "ssh://aur@aur.archlinux.org/#{pkgname}.git"
pkgrel = `git log --oneline $(git describe --tags --abbrev=0).. | wc -l`.strip
pkgver = /(?<=").+(?=\\\\\\\")/.match(::File.read('version.pri')).to_s.strip
pkgver = /project\(mpz VERSION (.+) LANGUAGES/.match(::File.read('CMakeLists.txt'))[1].to_s.strip
sha256sums = ::Digest::SHA256.hexdigest(::URI.open(source).read)
author_name = `git --no-pager log -1 --pretty=format:'%an'`.strip
author_email = `git --no-pager log -1 --pretty=format:'%ae'`.strip
Expand Down
25 changes: 13 additions & 12 deletions .omnipackage/config.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
extract_version:
provider: 'file'
file:
file: 'version.pri'
regex: 'VERSION=\\\\\\"(.+)\\\\\\"'
file: 'CMakeLists.txt'
regex: 'project\(mpz VERSION (.+) LANGUAGES'

rpm: &rpm
installable_package_name: 'mpz'
Expand All @@ -16,38 +16,39 @@ deb: &deb


opensuse_qt5: &opensuse_qt5
build_dependencies: [gcc, make, libqt5-qtbase-devel, libqt5-qtmultimedia-devel, libqt5-qtx11extras-devel]
build_dependencies: [gcc, make, cmake, libqt5-qtbase-devel, libqt5-qtmultimedia-devel, libqt5-qtx11extras-devel]
CMAKE_EXTRA_CLI: '-DUSE_QT5=ON'
<<: *rpm

opensuse_qt6: &opensuse_qt6
build_dependencies: [gcc, make, qt6-base-common-devel, qt6-multimedia-devel, qt6-widgets-devel, qt6-concurrent-devel]
qmake: qmake6
build_dependencies: [gcc, make, cmake, qt6-base-common-devel, qt6-multimedia-devel, qt6-widgets-devel, qt6-concurrent-devel]
<<: *rpm


mageia_qt5: &mageia_qt5
build_dependencies: [gcc, make, qtbase5-common-devel lib64qt5core-devel lib64qt5gui-devel lib64qt5widgets-devel lib64qt5concurrent-devel, lib64qt5multimedia-devel, lib64qt5x11extras-devel]
build_dependencies: [gcc, make, cmake, qtbase5-common-devel lib64qt5core-devel lib64qt5gui-devel lib64qt5widgets-devel lib64qt5concurrent-devel, lib64qt5multimedia-devel, lib64qt5x11extras-devel]
CMAKE_EXTRA_CLI: '-DUSE_QT5=ON'
<<: *rpm


readhat_qt5: &readhat_qt5
build_dependencies: [gcc, make, qt5-qtbase-devel, qt5-qtmultimedia-devel, qt5-qtx11extras-devel]
build_dependencies: [gcc, make, cmake, qt5-qtbase-devel, qt5-qtmultimedia-devel, qt5-qtx11extras-devel]
CMAKE_EXTRA_CLI: '-DUSE_QT5=ON'
<<: *rpm

readhat_qt6: &readhat_qt6
build_dependencies: [gcc, make, qt6-qtbase-devel, qt6-qtmultimedia-devel]
qmake: qmake6
build_dependencies: [gcc, make, cmake, qt6-qtbase-devel, qt6-qtmultimedia-devel]
<<: *rpm


debian_qt5: &debian_qt5
build_dependencies: [gcc, make, qt5-qmake, qtbase5-dev-tools, qtchooser, qtbase5-dev, qtmultimedia5-dev, libqt5x11extras5-dev]
build_dependencies: [gcc, make, cmake, qtbase5-dev-tools, qtchooser, qtbase5-dev, qtmultimedia5-dev, libqt5x11extras5-dev]
runtime_dependencies: [libqt5multimedia5-plugins]
qt_select: qt5
CMAKE_EXTRA_CLI: '-DUSE_QT5=ON'
<<: *deb

debian_qt6: &debian_qt6
build_dependencies: [gcc, make, qmake6, qt6-tools-dev, qt6-base-dev, qt6-multimedia-dev]
build_dependencies: [gcc, make, cmake, qt6-tools-dev, qt6-base-dev, qt6-multimedia-dev]
before_build_script: '.omnipackage/debian_qt6_hack.sh'
<<: *deb

Expand Down
7 changes: 2 additions & 5 deletions .omnipackage/deb/rules.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,6 @@
# Be carefull, this is a Makefile, so the indents are tabs and not spaces!
# -*- makefile -*-

export DESTROOT=$(CURDIR)/debian/mpz
export QT_SELECT={{ qt_select | default: "qt5" }}

{% if LDFLAGS %}
export LDFLAGS={{ LDFLAGS }}
{% endif %}
Expand All @@ -16,5 +13,5 @@ export CPPFLAGS={{ CPPFLAGS }}
%:
dh $@

override_dh_auto_install:
make install INSTALL_ROOT=$(DESTROOT)
override_dh_auto_configure:
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=/usr {{ CMAKE_EXTRA_CLI }}
10 changes: 5 additions & 5 deletions .omnipackage/mpz.spec.liquid
Original file line number Diff line number Diff line change
Expand Up @@ -22,16 +22,16 @@ Similar to "album list" in Foobar2000.


%build
mkdir build
cd build
{{ qmake | default: "qmake-qt5" }} CONFIG+=release {{ qmake_extra_args }} ..
mkdir _build
cd _build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_INSTALL_PREFIX=%{buildroot}/usr {{ CMAKE_EXTRA_CLI }} ..
make %{?_smp_mflags}



%install
cd build
make install INSTALL_ROOT=%{buildroot}
cd _build
make install


%files
Expand Down
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes
36 changes: 36 additions & 0 deletions 3rdparty/taglib-2.0.2/taglib-config.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@

####### Expanded from @PACKAGE_INIT@ by configure_package_config_file() #######
####### Any changes to this file will be overwritten by the next CMake run ####
####### The input file was taglib-config.cmake.in ########

get_filename_component(PACKAGE_PREFIX_DIR "${CMAKE_CURRENT_LIST_DIR}/../../../" ABSOLUTE)

macro(set_and_check _var _file)
set(${_var} "${_file}")
if(NOT EXISTS "${_file}")
message(FATAL_ERROR "File or directory ${_file} referenced by variable ${_var} does not exist !")
endif()
endmacro()

macro(check_required_components _NAME)
foreach(comp ${${_NAME}_FIND_COMPONENTS})
if(NOT ${_NAME}_${comp}_FOUND)
if(${_NAME}_FIND_REQUIRED_${comp})
set(${_NAME}_FOUND FALSE)
endif()
endif()
endforeach()
endmacro()

####################################################################################

include("${CMAKE_CURRENT_LIST_DIR}/taglib-targets.cmake")

set(TAGLIB_FOUND ${TagLib_FOUND})
set(TAGLIB_VERSION ${TagLib_VERSION})

check_required_components("TagLib")

if(NOT TARGET TagLib::TagLib)
add_library(TagLib::TagLib ALIAS TagLib::tag)
endif()
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Loading

0 comments on commit f6b2a32

Please sign in to comment.