-
Notifications
You must be signed in to change notification settings - Fork 145
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Cristian Le <[email protected]>
- Loading branch information
Showing
10 changed files
with
211 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
summary: | ||
Test the bundled ctests and pytest | ||
discover+: | ||
how: fmf | ||
path: test-suite | ||
execute: | ||
how: tmt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
discover: | ||
how: fmf | ||
dist-git-source: true | ||
dist-git-extract: wannier90-*/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
plan: | ||
import: | ||
url: https://github.com/packit/tmt-plans | ||
ref: main | ||
name: /plans/rpminspect |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
prepare: | ||
- how: shell | ||
script: cp ./*.rpmlintrc $TMT_PLAN_DATA/ | ||
discover: | ||
how: fmf | ||
filter: "tag: rpmlint" | ||
url: https://github.com/packit/tmt-plans | ||
ref: main | ||
execute: | ||
how: tmt |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,69 @@ | ||
Name: wannier90 | ||
Summary: The Maximally-Localised Generalised Wannier Functions Code | ||
Version: 0.0.0 | ||
Release: %autorelease | ||
License: GPLv2 | ||
URL: https://www.wannier.org/ | ||
|
||
Source: https://github.com/wannier-developers/wannier90/archive/refs/tags/v%{version}.tar.gz | ||
|
||
BuildRequires: ninja-build | ||
BuildRequires: cmake | ||
BuildRequires: gcc-fortran | ||
BuildRequires: flexiblas-devel | ||
# Required for testing | ||
BuildRequires: gcc-c++ | ||
BuildRequires: python3 | ||
|
||
%global _description %{expand: | ||
Maximally-Localised Generalised Wannier Functions Code.} | ||
|
||
%description | ||
%{_description} | ||
|
||
%package devel | ||
Summary: Development files for wannier90 | ||
Requires: wannier90%{?_isa} = %{version}-%{release} | ||
|
||
%description devel | ||
This package contains the development files for the wannier90 library. | ||
|
||
%prep | ||
%autosetup -n wannier90-%{version} | ||
|
||
|
||
%build | ||
%cmake \ | ||
-G Ninja \ | ||
-DWANNIER90_MPI=OFF \ | ||
-DWANNIER90_SHARED_LIBS=ON \ | ||
-DWANNIER90_TEST=ON \ | ||
-DCMAKE_INSTALL_MODULEDIR=%{_fmoddir} | ||
|
||
%cmake_build | ||
|
||
|
||
%install | ||
%cmake_install | ||
|
||
|
||
%check | ||
%ctest | ||
|
||
|
||
%files | ||
%doc README.rst | ||
%license LICENSE | ||
%{_libdir}/libwannier90.so.* | ||
%{_bindir}/wannier90.x | ||
%{_bindir}/postw90.x | ||
|
||
%files devel | ||
%{_includedir}/wannier90.hh | ||
%{_libdir}/libwannier90.so | ||
%{_fmoddir}/Wannier90/ | ||
%{_libdir}/cmake/Wannier90 | ||
%{_libdir}/pkgconfig/wannier90.pc | ||
|
||
%changelog | ||
%autochangelog |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,79 @@ | ||
specfile_path: .distro/wannier90.spec | ||
files_to_sync: | ||
- src: .distro/ | ||
dest: ./ | ||
filters: | ||
- "- plans/main.fmf.dist-git" | ||
- "- plans/rpminspect.fmf" | ||
- "- plans/rpmlint.fmf" | ||
- src: .distro/plans/main.fmf.dist-git | ||
dest: plans/main.fmf | ||
- .packit.yaml | ||
|
||
upstream_package_name: wannier90 | ||
downstream_package_name: wannier90 | ||
update_release: false | ||
upstream_tag_template: v{version} | ||
|
||
jobs: | ||
- job: copr_build | ||
trigger: pull_request | ||
owner: lecris | ||
project: wannier90 | ||
update_release: true | ||
release_suffix: "{PACKIT_RPMSPEC_RELEASE}" | ||
targets: | ||
- fedora-all-x86_64 | ||
- fedora-all-aarch64 | ||
- job: tests | ||
trigger: pull_request | ||
targets: | ||
- fedora-all-x86_64 | ||
- fedora-all-aarch64 | ||
fmf_path: .distro | ||
- job: copr_build | ||
trigger: commit | ||
branch: develop | ||
owner: lecris | ||
project: nightly | ||
additional_repos: | ||
- copr://@scikit-build/release | ||
targets: | ||
- fedora-all-x86_64 | ||
- fedora-all-aarch64 | ||
- job: tests | ||
trigger: commit | ||
branch: develop | ||
targets: | ||
- fedora-all-x86_64 | ||
- fedora-all-aarch64 | ||
fmf_path: .distro | ||
- job: copr_build | ||
trigger: release | ||
owner: lecris | ||
project: release | ||
targets: | ||
- fedora-all-x86_64 | ||
- fedora-all-aarch64 | ||
- job: tests | ||
trigger: release | ||
targets: | ||
- fedora-all-x86_64 | ||
- fedora-all-aarch64 | ||
fmf_path: .distro | ||
- job: propose_downstream | ||
trigger: release | ||
dist_git_branches: | ||
# TODO: Switch to fedora-development and fedora-latest | ||
# There is an issue that the commits diverge on different PRs. In the meantime will create PRs on branched fedora | ||
# manually | ||
# https://github.com/packit/packit/issues/1724 | ||
- fedora-rawhide | ||
- job: koji_build | ||
trigger: commit | ||
dist_git_branches: | ||
- fedora-all | ||
- job: bodhi_update | ||
trigger: commit | ||
dist_git_branches: | ||
- fedora-branched |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
tag: [ cmake ] | ||
require: | ||
- cmake | ||
- rsync | ||
- gcc | ||
- gcc-c++ | ||
- gcc-fortran | ||
- pkgconf | ||
- git | ||
framework: beakerlib | ||
path: / | ||
test: ./ctest.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
# vim: dict+=/usr/share/beakerlib/dictionary.vim cpt=.,w,b,u,t,i,k | ||
# shellcheck disable=all | ||
source /usr/share/beakerlib/beakerlib.sh || exit 1 | ||
|
||
rlJournalStart | ||
rlPhaseStartSetup | ||
rlRun "tmp=\$(mktemp -d)" 0 "Create tmp directory" | ||
rlRun "rsync -rL ./ $tmp" 0 "Copy test-suite project" | ||
rlRun "pushd $tmp" | ||
rlRun "set -o pipefail" | ||
rlPhaseEnd | ||
|
||
rlPhaseStartTest | ||
rlRun "cmake -B ./build -DSPGLIB_WITH_Fortran=ON" 0 "CMake configure" | ||
rlRun "cmake --build ./build" 0 "CMake build" | ||
rlRun "ctest --test-dir ./build --output-on-failure" 0 "Run CTest" | ||
rlPhaseEnd | ||
|
||
rlPhaseStartCleanup | ||
rlRun "popd" | ||
rlRun "rm -r $tmp" 0 "Remove tmp directory" | ||
rlPhaseEnd | ||
rlJournalEnd |