port hyprgraphics to using helpers
This commit is contained in:
@@ -5,7 +5,7 @@
|
||||
hyprgraphics:
|
||||
vers: "{{ pkgconfig.hyprgraphics.version }}"
|
||||
repo: "{{ pkgconfig.hyprgraphics.repo }}"
|
||||
build_deps: "{{ pkgconfig.hyprgraphics.build_deps[ansible_os_family] }}"
|
||||
build_deps: "{{ srcconfig.hyprgraphics.deps[ansible_os_family] }}"
|
||||
installed_files: "{{ pkgconfig.hyprgraphics.build_installed_files }}"
|
||||
git_path: "{{ d_tempdir.path }}/hyprgraphics"
|
||||
clean: "{{ pkgconfig_hyprland_clean | default(package_default_clean_src) }}"
|
||||
|
||||
@@ -3,13 +3,10 @@
|
||||
- name: Remove existing install of {{ pkg }}
|
||||
when:
|
||||
- hyprgraphics.clean
|
||||
become: true
|
||||
loop: "{{ hyprgraphics.installed_files }}"
|
||||
loop_control:
|
||||
loop_var: file
|
||||
ansible.builtin.file:
|
||||
state: absent
|
||||
path: "{{ hyprland.prefix }}/{{ file }}"
|
||||
vars:
|
||||
file_list: "{{ srcconfig.hyprcursor.build_installed_files }}"
|
||||
ansible.builtin.include_tasks:
|
||||
file: helpers/clean_install.yml
|
||||
|
||||
- name: Check for existing install {{ pkg }}
|
||||
register: stat_hyprgraphics_inst
|
||||
@@ -20,49 +17,22 @@
|
||||
when:
|
||||
- not stat_hyprgraphics_inst.stat.exists
|
||||
block:
|
||||
- name: Clone git repository {{ pkg }}
|
||||
ansible.builtin.git:
|
||||
force: true
|
||||
depth: 1
|
||||
dest: "{{ hyprgraphics.git_path }}"
|
||||
repo: "{{ hyprgraphics.repo }}"
|
||||
version: "{{ hyprgraphics.vers }}"
|
||||
- name: Do repo clone {{ pkg }}
|
||||
vars:
|
||||
src_pkg: hyprgraphics
|
||||
src_path: "{{ srcconfig.hyprgraphics.src_path }}"
|
||||
src_gitrepo: "{{ srconfig.hyprgraphics.gitrepo }}"
|
||||
src_version: "{{ hyprgraphics.vers }}"
|
||||
ansible.builtin.include_tasks:
|
||||
file: helpers/git.yml
|
||||
|
||||
- name: Configure {{ pkg }}
|
||||
ansible.builtin.command:
|
||||
creates: "{{ hyprgraphics.git_path }}/build"
|
||||
chdir: "{{ hyprgraphics.git_path }}"
|
||||
argv:
|
||||
- cmake
|
||||
- --no-warn-unused-cli
|
||||
- DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_INSTALL_PREFIX={{ hyprland.prefix }}
|
||||
- -S
|
||||
- .
|
||||
- -B
|
||||
- ./build
|
||||
|
||||
- name: Build {{ pkg }}
|
||||
ansible.builtin.command:
|
||||
creates: "{{ hyprgraphics.git_path }}/build/libhyprgraphics.so"
|
||||
chdir: "{{ hyprgraphics.git_path }}"
|
||||
argv:
|
||||
- cmake
|
||||
- --build
|
||||
- ./build
|
||||
- --config
|
||||
- Release
|
||||
- --target
|
||||
- all
|
||||
- -j
|
||||
- "{{ ansible_processor_nproc | int }}"
|
||||
|
||||
- name: Install {{ pkg }}
|
||||
become: true
|
||||
ansible.builtin.command:
|
||||
creates: "{{ path.bin }}/hyprgraphics"
|
||||
chdir: "{{ hyprgraphics.git_path }}"
|
||||
argv:
|
||||
- cmake
|
||||
- --install
|
||||
- ./build
|
||||
- name: CMake build and install {{ pkg }}
|
||||
vars:
|
||||
src_path: "{{ srcconfig.hyprgraphics.src_path }}"
|
||||
configure: "{{ srcconfig.hyprgraphics.configure }}"
|
||||
build_creates: "{{ srcconfig.hyprgraphics.build_creates }}"
|
||||
build: "{{ srcconfig.hyprgraphics.build }}"
|
||||
install_creates: "{{ srcconfig.hyprgraphics.install_creates }}"
|
||||
install: "{{ srcconfig.hyprcursor.install }}"
|
||||
ansible.builtin.include_tasks:
|
||||
files: helpers/cmake_build.yml
|
||||
|
||||
@@ -1,6 +1,32 @@
|
||||
# vim: set filetype=yaml.ansible :
|
||||
---
|
||||
hyprgraphics:
|
||||
src_path: "{{ d_tempdir.path }}/hyprgraphics"
|
||||
configure:
|
||||
- cmake
|
||||
- --no-warn-unused-cli
|
||||
- DCMAKE_BUILD_TYPE=Release
|
||||
- -DCMAKE_INSTALL_PREFIX={{ hyprland.prefix }}
|
||||
- -S
|
||||
- .
|
||||
- -B
|
||||
- ./build
|
||||
build_creates: "{{ d_tempdir.path }}/hyprgraphics/build/libhyprgraphics.so"
|
||||
build:
|
||||
- cmake
|
||||
- --build
|
||||
- ./build
|
||||
- --config
|
||||
- Release
|
||||
- --target
|
||||
- all
|
||||
- -j
|
||||
- "{{ ansible_processor_nproc | int }}"
|
||||
install_creates: "{{ root_prefix }}/{{ lib_path }}/libhyprgraphics.so.0.1.2"
|
||||
install:
|
||||
- cmake
|
||||
- --install
|
||||
- ./build
|
||||
deps:
|
||||
RedHat:
|
||||
- pixman-devel
|
||||
|
||||
Reference in New Issue
Block a user