mirror of
https://github.com/theCheeseboard/libtdesktopenvironment.git
synced 2025-01-22 10:22:02 -05:00
Fix COPR build
This commit is contained in:
parent
40e17eceed
commit
f7045a941b
3 changed files with 52 additions and 8 deletions
|
@ -5,7 +5,7 @@ Summary: Common libraries for desktop integration for the- apps
|
|||
|
||||
License: GPLv3+
|
||||
URL: https://github.com/vicr123/libtdesktopenvironment
|
||||
Source0: {{{ git_dir_pack }}}
|
||||
Source: {{{ git_archive_force path=$GIT_ROOT root_dir_name=libtdesktopenvironment }}}
|
||||
Conflicts: libtdesktopenvironment
|
||||
Provides: libtdesktopenvironment
|
||||
VCS: {{{ git_dir_vcs }}}
|
||||
|
@ -34,9 +34,8 @@ developing applications that use %{name}.
|
|||
|
||||
%prep
|
||||
{{{ git_dir_setup_macro }}}
|
||||
cd lib/wayland-protocols
|
||||
git clone https://gitlab.freedesktop.org/wayland/wayland-protocols.git
|
||||
git clone https://github.com/swaywm/wlr-protocols.git
|
||||
git submodule init
|
||||
git submodule update
|
||||
|
||||
%build
|
||||
qmake-qt5
|
||||
|
|
|
@ -5,7 +5,7 @@ Summary: Common libraries for desktop integration for the- apps
|
|||
|
||||
License: GPLv3+
|
||||
URL: https://github.com/vicr123/libtdesktopenvironment
|
||||
Source0: {{{ git_dir_pack }}}
|
||||
Source: {{{ git_archive_force path=$GIT_ROOT root_dir_name=libtdesktopenvironment }}}
|
||||
VCS: {{{ git_dir_vcs }}}
|
||||
|
||||
%if 0%{?fedora} >= 33
|
||||
|
@ -30,9 +30,8 @@ developing applications that use %{name}.
|
|||
|
||||
%prep
|
||||
{{{ git_dir_setup_macro }}}
|
||||
cd lib/wayland-protocols
|
||||
git clone https://gitlab.freedesktop.org/wayland/wayland-protocols.git
|
||||
git clone https://github.com/swaywm/wlr-protocols.git
|
||||
git submodule init
|
||||
git submodule update
|
||||
|
||||
%build
|
||||
qmake-qt5
|
||||
|
|
46
rpkg.macros
46
rpkg.macros
|
@ -3,3 +3,49 @@ function git_calculate_version {
|
|||
version_string_substituted=${version_string//-/.}
|
||||
echo ${version_string_substituted#*v}
|
||||
}
|
||||
|
||||
function git_archive_force {
|
||||
# This macro uses the latest local commit to
|
||||
# archive the content. Useful to reproducibly
|
||||
# provide a trackable archive content. In pax
|
||||
# header, you can find the commit hash.
|
||||
declare path= dir_name= source_name= root_dir_name= "$@"
|
||||
|
||||
git_check_path "$path" || return
|
||||
|
||||
if [ -z "$GIT_HEAD" ]; then
|
||||
log_error "No commits yet. Content cannot be archived."
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "$root_dir_name" ]; then
|
||||
log_error "Root directory name not specified."
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "$dir_name" ]; then
|
||||
dir_name=$(git_url_path_name "$path") || return
|
||||
fi
|
||||
|
||||
if [ -z "$dir_name" ]; then
|
||||
log_error "Could not derive dir_name from remote URL and path."
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ -z "$source_name" ]; then
|
||||
source_name=${dir_name}-${GIT_HEAD_SHORT}.tar.gz
|
||||
fi
|
||||
|
||||
if [ -z "$OUTDIR" ]; then
|
||||
log_debug "OUTDIR is not set. No action taken."
|
||||
output "$source_name"
|
||||
return
|
||||
fi
|
||||
|
||||
cd $path/..
|
||||
log_debug tar -zcvf $OUTDIR/$source_name $root_dir_name
|
||||
log_debug "$(tar -zcvf $OUTDIR/$source_name .)"
|
||||
log_info "Wrote: $OUTDIR/$source_name"
|
||||
output "$source_name"
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue