Skip to content

Commit

Permalink
create pkg
Browse files Browse the repository at this point in the history
  • Loading branch information
UriHerrera committed Nov 6, 2024
1 parent 7367320 commit 15e3e02
Show file tree
Hide file tree
Showing 21 changed files with 261 additions and 2 deletions.
26 changes: 26 additions & 0 deletions .github/ISSUE_TEMPLATE/bug_report.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
---
name: 🐞 Bug report
about: Create a report to help us improve

---

**Describe the bug**
A clear and concise description of what the bug is.

**To Reproduce**
Steps to reproduce the behavior:
1. Go to '...'
2. Click on '....'
3. Scroll down to '....'
4. See error

**Expected behavior**
A clear and concise description of what you expected to happen.

**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. iOS]
- Browser [e.g. chrome, safari]
- Version [e.g. 22]
42 changes: 42 additions & 0 deletions .github/ISSUE_TEMPLATE/feature_request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
---
name: "🚀 Feature request"
about: Suggest an idea for improving this software
title: ''
labels: 'type:Enhancement'
assignees: ''

---

### Is your proposal related to a problem?

<!--
Provide a clear and concise description of what the problem is.
For example, "I'm always frustrated when..."
-->

(Write your answer here.)

### Describe the solution you'd like

<!--
Provide a clear and concise description of what you want to happen.
-->

(Describe your proposed solution here.)

### Describe alternatives you've considered

<!--
Let us know about other solutions you've tried or researched.
-->

(Write your answer here.)

### Additional context

<!--
Is there anything else you can add about the proposal?
You might want to link to related issues here, if you haven't already.
-->

(Write your answer here.)
28 changes: 28 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Build and push packages to PackageCloud.

on:
push:
branches:
- 'main'
paths-ignore:
- 'README.md'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- name: Install dependencies.
run: |
sudo gem install package_cloud
- name: Build.
run: |
sudo ./gh-build.sh
- name: Push package.
env:
PACKAGECLOUD_TOKEN: ${{ secrets.PACKAGECLOUD_TOKEN }}
run: |
package_cloud push nitrux/testing/debian/trixie $(pwd)/*.deb
8 changes: 8 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# Compiled source #
###################
*.directory
*.DS_Store
*.bak
/.project
*.db
*.qmlc
10 changes: 8 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,8 @@
# nvidia-openrc
OpenRC service scripts used by the NVIDIA proprietary driver.
# NVIDIA Services for OpenRC

Service files to enable stuff needed by the NVIDIA proprietary driver with Nitrux.

# Issues
If you find problems with the contents of this repository please create an issue.

©2024 Nitrux Latinoamericana S.C.
5 changes: 5 additions & 0 deletions debian/changelog
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
nvidia-openrc (0.0.1) nitrux; urgency=medium

* Create package.

-- Uri Herrera <[email protected]> Wed, 06 Nov 2024 04:46:00 -0500
1 change: 1 addition & 0 deletions debian/compat
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9
17 changes: 17 additions & 0 deletions debian/control
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
Source: nvidia-openrc
Section: misc
Priority: important
Maintainer: Uri Herrera <[email protected]>
Build-Depends: debhelper (>=9)
Standards-Version: 3.9.6
Homepage: http://nxos.org


Package: nvidia-openrc
Architecture: all
Depends: ${shlibs:Depends}, ${misc:Depends}, openrc
Conflicts: systemd, systemd-sysv
Description: Package to add NVIDIA services configuration for OpenRC.
This package will add the boot scripts to use NVIDIA services
with OpenRC in Nitrux.

29 changes: 29 additions & 0 deletions debian/copyright
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: debugfs-openrc
Source: https://github.com/Nitrux/debugfs-openrc.git

Files: *
Copyright: 2022 Uri Herrera <[email protected]>
License: GPL-3.0+

Files: debian/*
Copyright: 2022 Uri Herrera <[email protected]>
License: GPL-3.0+

License: GPL-3.0+
This program is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
.
This package is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program. If not, see <https://www.gnu.org/licenses/>.
.
On Debian systems, the complete text of the GNU General
Public License version 3 can be found in "/usr/share/common-licenses/GPL-3".

1 change: 1 addition & 0 deletions debian/install
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
etc /
12 changes: 12 additions & 0 deletions debian/postinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/env bash

# -- Add service to runlevel.

rc-update add nvidia-suspend async
rc-update add nvidia-resume async
rc-update add nvidia-hibernate async
rc-update add nvidia-powerd async

# -- Update services list.

rc-update -u
3 changes: 3 additions & 0 deletions debian/postrm
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash

exit 0
3 changes: 3 additions & 0 deletions debian/preinst
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#! /bin/bash

exit 0
5 changes: 5 additions & 0 deletions debian/rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/usr/bin/make -f


%:
dh $@
1 change: 1 addition & 0 deletions debian/source/format
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
3.0 (quilt)
10 changes: 10 additions & 0 deletions etc/init.d/nvidia-hibernate
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/sbin/openrc-run

description="NVIDIA system hibernate actions"

start() {
ebegin "Running NVIDIA system hibernate actions"
/usr/bin/logger -t hibernate -s "nvidia-hibernate.service"
/usr/bin/nvidia-sleep.sh "hibernate"
eend $?
}
11 changes: 11 additions & 0 deletions etc/init.d/nvidia-powerd
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/sbin/openrc-run

description="nvidia-powerd service"
command="/usr/bin/nvidia-powerd"
command_background="yes"

depend() {
need localmount
after bootmisc
use logger
}
10 changes: 10 additions & 0 deletions etc/init.d/nvidia-resume
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/sbin/openrc-run

description="NVIDIA system resume actions"

start() {
ebegin "Running NVIDIA system resume actions"
/usr/bin/logger -t resume -s "nvidia-resume.service"
/usr/bin/nvidia-sleep.sh "resume"
eend $?
}
10 changes: 10 additions & 0 deletions etc/init.d/nvidia-suspend
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/sbin/openrc-run

description="NVIDIA system suspend actions"

start() {
ebegin "Running NVIDIA system suspend actions"
/usr/bin/logger -t suspend -s "nvidia-suspend.service"
/usr/bin/nvidia-sleep.sh "suspend"
eend $?
}
17 changes: 17 additions & 0 deletions gh-build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#! /bin/bash

set -x

### Basic Packages
apt -qq update
apt -qq -yy install equivs git devscripts lintian --no-install-recommends

### Install Dependencies
mk-build-deps -i -t "apt-get --yes" -r

### Build Deb
debuild -b -uc -us

### Move Deb to current directory because debuild decided
### that it was a GREAT IDEA TO PUT THE FILE ONE LEVEL ABOVE
mv ../*.deb .
14 changes: 14 additions & 0 deletions nvidia-suspend
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#!/sbin/openrc-run

description="NVIDIA system suspend actions"

depend() {
before suspend
}

start() {
ebegin "Running NVIDIA system suspend actions"
/usr/bin/logger -t suspend -s "nvidia-suspend.service"
/usr/bin/nvidia-sleep.sh "suspend"
eend $?
}

0 comments on commit 15e3e02

Please sign in to comment.