diff --git a/tasks/config/aquamarine.yml b/tasks/config/aquamarine.yml index 1305bd5..a576cf1 100644 --- a/tasks/config/aquamarine.yml +++ b/tasks/config/aquamarine.yml @@ -7,3 +7,4 @@ pkg_deps: "{{ pkgconfig.aquamarine.pkg_deps }}" installed_files: "{{ pkgconfig.aquamarine.build_installed_files }}" bin: aquamarine + build_deps: "{{ pkgconfig.aquamarine.build_deps[ansible_os_family] }}" diff --git a/tasks/config/hyprutils.yml b/tasks/config/hyprutils.yml new file mode 100644 index 0000000..df29b0d --- /dev/null +++ b/tasks/config/hyprutils.yml @@ -0,0 +1,8 @@ +- name: Set hyprutils config + ansible.builtin.set_fact: + hyprutils: + vers: "{{ pkgconfig.hyprutils.version }}" + repo: "{{ pkgconfig.hyprutils.repo }}" + git_path: "{{ d_tempdir.path }}/hyprutils" + installed_files: "{{ pkgconfig.hyprutils.build_installed_files }}" + build_deps: "{{ pkgconfig.hyprutils.build_deps[ansible_os_family] }}" diff --git a/tasks/pkgs/aquamarine.yml b/tasks/pkgs/aquamarine.yml index f476338..256a51c 100644 --- a/tasks/pkgs/aquamarine.yml +++ b/tasks/pkgs/aquamarine.yml @@ -7,6 +7,7 @@ ansible.builtin.include_tasks: file: addpkg.yml -- name: Append to pkg_src +- name: Append to pkg_sys ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + aquamarine.build_deps }}" pkg_src: "{{ pkg_src + ['aquamarine'] }}" diff --git a/tasks/pkgs/hyprutils.yml b/tasks/pkgs/hyprutils.yml new file mode 100644 index 0000000..15d84eb --- /dev/null +++ b/tasks/pkgs/hyprutils.yml @@ -0,0 +1,4 @@ +- name: Append to pkg_src + ansible.builtin.set_fact: + pkg_sys: "{{ pkg_sys + hyprutils.build_deps }}" + pkg_src: "{{ pkg_src + ['hyprutils'] }}" diff --git a/tasks/src/aquamarine.yml b/tasks/src/aquamarine.yml index 1c66097..522d453 100644 --- a/tasks/src/aquamarine.yml +++ b/tasks/src/aquamarine.yml @@ -18,28 +18,36 @@ repo: "{{ aquamarine.repo }}" version: "{{ aquamarine.vers }}" - - name: Configure hyprwayland-scanner + - name: Configure aquamarine ansible.builtin.command: creates: "{{ aquamarine.git_path }}/build" chdir: "{{ aquamarine.git_path }}" argv: - cmake + - --no-warn-unused-cli + - DCMAKE_BUILD_TYPE=Release - -DCMAKE_INSTALL_PREFIX={{ path.prefix }} + - -S + - . - -B - - build + - ./build - - name: Build hyprwayland-scanner + - name: Build aquamarine ansible.builtin.command: creates: "{{ aquamarine.git_path }}/build/" chdir: "{{ aquamarine.git_path }}" argv: - cmake - --build - - build + - ./build + - --config + - Release + - --target + - all - -j - "{{ ansible_processor_nproc|int }}" - - name: Install hyprwayland-scanner + - name: Install aquamarine become: "{{ ext_become }}" ansible.builtin.command: creates: "{{ path.bin }}/aquamarine" @@ -47,4 +55,4 @@ argv: - cmake - --install - - build + - ./build diff --git a/tasks/src/hyprutils.yml b/tasks/src/hyprutils.yml new file mode 100644 index 0000000..95595e9 --- /dev/null +++ b/tasks/src/hyprutils.yml @@ -0,0 +1,58 @@ +- name: Remove existing install + when: + - hyprland_clean + become: "{{ ext_become }}" + loop: hyprutils.installed_files + loop_control: + loop_var: file + ansible.builtin.file: + state: absent + path: "{{ path.prefix }}/{{ file }}" + +- name: Build and install hyprutils + block: + - name: Clone git repository + ansible.builtin.git: + depth: 1 + dest: "{{ hyprutils.git_path }}" + repo: "{{ hyprutils.repo }}" + version: "{{ hyprutils.vers }}" + + - name: Configure hyprutils + ansible.builtin.command: + creates: "{{ hyprutils.git_path }}/build" + chdir: "{{ hyprutils.git_path }}" + argv: + - cmake + - --no-warn-unused-cli + - DCMAKE_BUILD_TYPE=Release + - -DCMAKE_INSTALL_PREFIX={{ path.prefix }} + - -S + - . + - -B + - ./build + + - name: Build hyprutils + ansible.builtin.command: + creates: "{{ hyprutils.git_path }}/build/hyprutils.pc" + chdir: "{{ hyprutils.git_path }}" + argv: + - cmake + - --build + - ./build + - --config + - Release + - --target + - all + - -j + - "{{ ansible_processor_nproc|int }}" + + - name: Install hyprutils + become: "{{ ext_become }}" + ansible.builtin.command: + creates: "{{ path.bin }}/hyprutils" + chdir: "{{ hyprutils.git_path }}" + argv: + - cmake + - --install + - ./build diff --git a/vars/pkgs/aquamarine.yml b/vars/pkgs/aquamarine.yml index c1d5f5a..da45b5a 100644 --- a/vars/pkgs/aquamarine.yml +++ b/vars/pkgs/aquamarine.yml @@ -3,6 +3,7 @@ aquamarine: repo: https://github.com/hyprwm/aquamarine pkg_deps: - hyprwayland-scanner + - hyprutils build_deps: RedHat: - libseat-devel @@ -14,3 +15,9 @@ aquamarine: - libdisplay-info-devel - systemd-devel - hwdata-devel + build_installed_files: + - lib64/libaquamarine.so.0.7.2 + - lib64/libaquamarine.so.6 + - lib64/libaquamarine.so + - include/aquamarine + - lib64/pkgconfig/aquamarine.pc diff --git a/vars/pkgs/hyprutils.yml b/vars/pkgs/hyprutils.yml new file mode 100644 index 0000000..4e1ea2a --- /dev/null +++ b/vars/pkgs/hyprutils.yml @@ -0,0 +1,12 @@ +hyprutils: + version: v0.5.1 + repo: https://github.com/hyprwm/hyprutils + build_deps: + RedHat: + - pixman-devel + build_installed_files: + - lib64/libhyprutils.so.0.5.1 + - lib64/libhyprutils.so.4 + - lib64/libhyprutils.so + - include/hyprutils + - lib64/pkgconfig/hyprutils.pc