-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
abec95b
commit 2ae52ea
Showing
3 changed files
with
117 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,47 @@ | ||
--- | ||
name: Upload tzupdate source RPM | ||
on: | ||
push: | ||
branches: | ||
- main | ||
paths: | ||
- 'tzupdate/**' | ||
workflow_dispatch: | ||
|
||
env: | ||
PACKAGE_NAME: tzupdate | ||
|
||
jobs: | ||
upload: | ||
name: Upload tzupdate source RPM to Fedora Copr | ||
runs-on: ubuntu-22.04 | ||
container: | ||
image: fedora:40 | ||
env: | ||
FEDORA_COPR_LOGIN: ${{ secrets.FEDORA_COPR_LOGIN }} | ||
FEDORA_COPR_TOKEN: ${{ secrets.FEDORA_COPR_TOKEN }} | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install RPM build dependencies | ||
run: dnf install -y copr-cli rpm-build rpmdevtools | ||
- name: Create the necessary RPM build directories | ||
run: mkdir -p ~/rpmbuild/SOURCES/ | ||
- name: Copy internal source files | ||
run: cp ${GITHUB_WORKSPACE}/${PACKAGE_NAME}/* ~/rpmbuild/SOURCES/ | ||
- name: Download external source files | ||
run: spectool -g -R ${GITHUB_WORKSPACE}/${PACKAGE_NAME}/*.spec | ||
- name: Build the source RPM | ||
run: rpmbuild -bs ${GITHUB_WORKSPACE}/${PACKAGE_NAME}/*.spec | ||
- name: Create the local configuration directory | ||
run: mkdir ~/.config/ | ||
- name: Create the copr-cli configuration file | ||
run: | | ||
cat <<EOF > ~/.config/copr | ||
[copr-cli] | ||
login = ${FEDORA_COPR_LOGIN} | ||
username = playtron | ||
token = ${FEDORA_COPR_TOKEN} | ||
copr_url = https://copr.fedorainfracloud.org | ||
EOF | ||
- name: Upload the source RPM to Fedora Copr | ||
run: copr-cli build gaming ~/rpmbuild/SRPMS/${PACKAGE_NAME}-*.src.rpm |
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,38 @@ | ||
--- | ||
name: Test tzupdate | ||
on: | ||
push: | ||
branches-ignore: | ||
- main | ||
paths: | ||
- 'tzupdate/**' | ||
|
||
env: | ||
PACKAGE_NAME: tzupdate | ||
|
||
jobs: | ||
test: | ||
name: Test gamescope-session-playtron RPM build | ||
runs-on: ubuntu-22.04 | ||
container: | ||
image: fedora:40 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install RPM build dependencies | ||
run: dnf install -y copr-cli rpm-build rpmdevtools | ||
- name: Create the necessary RPM build directories | ||
run: mkdir -p ~/rpmbuild/SOURCES/ | ||
- name: Copy internal source files | ||
run: cp ${GITHUB_WORKSPACE}/${PACKAGE_NAME}/* ~/rpmbuild/SOURCES/ | ||
- name: Download external source files | ||
run: spectool -g -R ${GITHUB_WORKSPACE}/${PACKAGE_NAME}/${PACKAGE_NAME}.spec | ||
- name: Build the source RPM | ||
run: rpmbuild -bs ${GITHUB_WORKSPACE}/${PACKAGE_NAME}/${PACKAGE_NAME}.spec | ||
- name: Install the DNF build dependencies plugin | ||
run: dnf -y install 'dnf-command(builddep)' | ||
- name: Install the required build dependencies. | ||
run: dnf builddep -y ${GITHUB_WORKSPACE}/${PACKAGE_NAME}/${PACKAGE_NAME}.spec | ||
- name: Build the binary RPM | ||
run: rpmbuild -bb ${GITHUB_WORKSPACE}/${PACKAGE_NAME}/${PACKAGE_NAME}.spec | ||
- name: Install RPMs | ||
run: dnf -y install ~/rpmbuild/RPMS/*/*.rpm |
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,32 @@ | ||
Name: tzupdate | ||
Version: 3.1.0 | ||
Release: 1%{?dist} | ||
Summary: A command to automatically set the timezone based on GeoIP information | ||
License: MIT | ||
URL: https://github.com/cdown/tzupdate | ||
Source0: https://github.com/cdown/tzupdate/archive/refs/tags/%{version}.tar.gz | ||
BuildRequires: cargo rust | ||
|
||
# Disable the unused debug package. | ||
%global debug_package %{nil} | ||
|
||
%description | ||
%{summary}. | ||
|
||
%prep | ||
%setup -q -c | ||
|
||
%build | ||
cd tzupdate-%{version} | ||
cargo build --release | ||
|
||
%install | ||
mkdir -p %{buildroot}/usr/bin | ||
cp tzupdate-%{version}/target/release/tzupdate %{buildroot}/usr/bin/ | ||
|
||
%files | ||
/usr/bin/tzupdate | ||
|
||
%changelog | ||
* Fri Oct 11 2024 Luke Short <[email protected]> 3.1.0-1 | ||
- Initial RPM spec created |