-
Notifications
You must be signed in to change notification settings - Fork 63
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Migrate Fedora/RHEL packages to Fedora Copr
* update spec files * update github workflows * update READMEs * remove old fedora repo Closes: #146 Signed-off-by: Gonçalo Duarte <[email protected]>
- Loading branch information
1 parent
8079e8a
commit c984ba3
Showing
23 changed files
with
71 additions
and
369 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 |
---|---|---|
|
@@ -233,95 +233,8 @@ jobs: | |
shell: bash | ||
|
||
|
||
build-test-commit-rpms: | ||
needs: [test-in-docker-container] | ||
runs-on: ubuntu-latest | ||
container: | ||
image: fedora:39 | ||
steps: | ||
- name: Install Dependencies in Container | ||
run: | | ||
sudo dnf install -y git kernel-headers kernel-devel dmidecode lm_sensors PyQt5 python3-yaml python3-pip python3-argcomplete polkit rpmdevtools rpmlint rpm rpm-sign | ||
sudo dnf install -y dkms openssl mokutil | ||
shell: bash | ||
|
||
- name: Clone repo and submodules | ||
uses: actions/checkout@v3 | ||
with: | ||
path: ./LLL | ||
submodules: recursive | ||
fetch-depth: 0 | ||
|
||
- name: Check if tagged | ||
id: check_if_tagged | ||
run: | | ||
cd LLL | ||
otag=$(git tag --points-at HEAD) | ||
echo "Tag is ${otag}" | ||
if [ -z "$otag" ] | ||
then | ||
hastag=0 | ||
else | ||
hastag=1 | ||
fi | ||
echo "hastag=$hastag" >> $GITHUB_OUTPUT | ||
- name: Update submodules | ||
run: | | ||
cd LLL | ||
git submodule update --init | ||
git pull --recurse-submodules | ||
git submodule update --remote --recursive | ||
shell: bash | ||
|
||
- name: Build rpm darkdetect | ||
run: | | ||
cd LLL | ||
./deploy/build_packages/build_rpm_darkdetect.sh | ||
shell: bash | ||
|
||
- name: Build rpm LenovoLegionLinux | ||
run: | | ||
cd LLL | ||
./deploy/build_packages/build_rpm_LLL.sh | ||
shell: bash | ||
|
||
- name: Import GPG key | ||
uses: crazy-max/ghaction-import-gpg@v5 | ||
with: | ||
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
|
||
- name: Copy and Generate files - Fedora | ||
run: | | ||
cd LLL | ||
cd package_repo/fedora | ||
gpg --armor --export "${{ secrets.GPG_ID }}" > ./pgp-key.public | ||
sudo rpm --import pgp-key.public | ||
echo "%_signature gpg | ||
%_gpg_name Package Manager" > ~/.rpmmacros | ||
rpm --addsign ./packages/*.rpm | ||
cd packages | ||
rm repodata/* || true | ||
createrepo_c . | ||
gpg --batch --detach-sign --armor repodata/repomd.xml | ||
shell: bash | ||
|
||
- name: Commit changes | ||
if: steps.check_if_tagged.outputs.hastag == 1 | ||
run: | | ||
cd LLL | ||
git fetch | ||
git add -A | ||
git config user.name github-actions | ||
git config user.email [email protected] | ||
git commit -m "Add new rpms" | ||
git pull --rebase | ||
git push | ||
shell: bash | ||
|
||
test-packages: | ||
needs: [build-test-commit-debs, build-test-commit-rpms] | ||
needs: [build-test-commit-debs] | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
|
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
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,18 +1,21 @@ | ||
%global srcname darkdetect | ||
%define version _VERSION | ||
%global libname %{srcname} | ||
%global pkgname %{srcname} | ||
|
||
Summary: Detect OS Dark Mode from Python | ||
Name: python-darkdetect | ||
Version: %{version} | ||
Name: python-%{pkgname} | ||
Version: 0.8.0 | ||
Release: 1 | ||
Source0: %{name}-%{version}.tar.gz | ||
License: BSD-3-Clause | ||
Source0: https://github.com/albertosottile/darkdetect/archive/refs/tags/v%{version}.tar.gz | ||
Source1: https://raw.githubusercontent.com/johnfanv2/LenovoLegionLinux/main/deploy/build_packages/setup.cfg | ||
Source2: https://raw.githubusercontent.com/johnfanv2/LenovoLegionLinux/main/deploy/build_packages/setup.py | ||
License: Custom | ||
Group: Development/Libraries | ||
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-buildroot | ||
Prefix: %{_prefix} | ||
BuildArch: noarch | ||
BuildRequires: python3-devel | ||
BuildRequires: python3-setuptools | ||
BuildRequires: python3-wheel | ||
BuildRequires: python3-pip | ||
Vendor: Alberto Sottile <[email protected]> | ||
Packager: Gonçalo Negrier Duarte <[email protected]> | ||
Url: https://github.com/albertosottile/darkdetect | ||
|
@@ -84,19 +87,19 @@ pip install darkdetect[macos-listener] | |
|
||
|
||
%prep | ||
%autosetup -n %{name}-%{version} -n %{name}-%{version} | ||
%autosetup -p1 -n %{pkgname}-%{version} | ||
cp %{SOURCE1} %{SOURCE2} . | ||
sed -i "s/version = _VERSION/version = %{version}/g" setup.cfg | ||
|
||
%build | ||
unset RPM_BUILD_ROOT | ||
%{python3} setup.py bdist_wheel | ||
%pyproject_wheel | ||
|
||
%install | ||
[ "%{buildroot}" != "/" ] && rm -rf %{buildroot} | ||
mkdir %{buildroot} | ||
mkdir %{buildroot}/usr | ||
cd "%{_builddir}/%{name}-%{version}" | ||
%{python3} -m installer --destdir="%{buildroot}" dist/*.whl | ||
|
||
%files -n python-%{srcname} | ||
%{python3_sitelib}/darkdetect/* | ||
%{python3_sitelib}/darkdetect-%{version}.dist-info/* | ||
%pyproject_install | ||
%pyproject_save_files darkdetect | ||
|
||
%files -n python-%{pkgname} | ||
%doc README.md | ||
%license LICENSE | ||
%{python3_sitelib}/%{libname}/ | ||
%{python3_sitelib}/%{libname}-%{version}.dist-info |
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
Oops, something went wrong.