-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A hair pulling endeavor to create a deb file (#14)
* Add solid color * All kbs use config file * Add version machine * Add debian control * Define release blocker * test this * Test this * Define versioned release build * Build the deb * Ensure newline at end of file * Try packaging directly * Reset after build * Tweak the service a bit * Update clean and put json file in right place * Fix last commit * Fix last again * Make the default monitor * Specify correct architecture * Changes to control file should rebuild * Add dependencies * Try multiple depends lines * Try comma values * Add rules file * Add shlibs depends * Try doing it this way * Get it to build * Clean up a bit * Make install command * Output to correct dirs * This will run as part of the build anyway * Put it in bin? * Address some linter errors * Make things a bit more maintainable * Stop fucking with my executable dammit * Clean up the makefile a bit * Better root access detection * Fix minor issues with the deb * Store deb as github artifact * Install some deps * Use sudo ! * Use correct deps * Add a couple more deps * I should give up spelling and just mash the keyboard * Put license in the right place? * Remove unused code from installer * Also store exe as artifact * Remove unused keyboard interface * Reformat * Clean up rgb a bit * Clean up monitor keyboard * Complete cleanup * We need to not load colors for solid * Add washed out tests * Handle negative hsbs * Cover hex * Wait for it * Fix badge * Make monitor tests * Rename file
- Loading branch information
1 parent
4dcffd4
commit d073690
Showing
28 changed files
with
569 additions
and
163 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
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,11 +1,50 @@ | ||
.PHONY: clean | ||
|
||
SERVICE = keyboard-color | ||
BIN = ${DESTDIR}/usr/bin/keyboard-color | ||
UNIT = ${DESTDIR}/lib/systemd/system/keyboard-colors.service | ||
CONFIG = ${DESTDIR}/etc/keyboard-color.json | ||
COPYRIGHT = ${DESTDIR}/usr/share/doc/s76-keyboard-colors/copyright | ||
|
||
${SERVICE}: csharp/keyboards/*.cs csharp/keyboards/*/*.cs | ||
release: csharp/keyboards/*.cs csharp/keyboards/*/*.cs csharp/keyboards/keyboards.csproj version | ||
./version | ||
${MAKE} ${SERVICE} | ||
mv ${SERVICE} release | ||
|
||
${SERVICE}: csharp/keyboards/*.cs csharp/keyboards/*/*.cs csharp/keyboards/keyboards.csproj | ||
cd csharp/keyboards && dotnet publish -r linux-x64 -c Release -o ${SERVICE} | ||
mv csharp/keyboards/${SERVICE}/${SERVICE} ${SERVICE} | ||
|
||
${BIN}: release | ||
mkdir -p ${shell dirname ${BIN}} | ||
cp release ${BIN} | ||
|
||
${UNIT}: keyboard-colors.service | ||
mkdir -p ${shell dirname ${UNIT}} | ||
cp keyboard-colors.service ${UNIT} | ||
|
||
${CONFIG}: csharp/keyboards/settings.release.json | ||
mkdir -p ${shell dirname ${CONFIG}} | ||
cp csharp/keyboards/settings.release.json ${CONFIG} | ||
|
||
${COPYRIGHT}: LICENSE | ||
mkdir -p ${shell dirname ${COPYRIGHT}} | ||
cp LICENSE ${COPYRIGHT} | ||
|
||
../s76-keyboard-colors_1.0_amd64.deb: csharp/keyboards/*.cs csharp/keyboards/*/*.cs csharp/keyboards/keyboards.csproj debian/* csharp/keyboards/settings.release.json keyboard-colors.service | ||
debuild -b -us -uc | ||
|
||
package.deb: ../s76-keyboard-colors_1.0_amd64.deb | ||
cp ../s76-keyboard-colors_1.0_amd64.deb package.deb | ||
|
||
clean: | ||
cd csharp/keyboards && dotnet clean | ||
rm -rf ${SERVICE} | ||
cd csharp/version && dotnet clean | ||
cd csharp/UnitTests && dotnet clean | ||
rm -rf ${SERVICE} release version package.deb | ||
|
||
version: csharp/version/*.cs csharp/version/version.csproj | ||
cd csharp/version && dotnet publish -r linux-x64 -c Release -o version | ||
mv csharp/version/version/version version | ||
|
||
install: debian/control debian/changelog debian/rules ${COPYRIGHT} ${CONFIG} ${UNIT} ${BIN} |
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 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.1.0-beta.5 |
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
File renamed without changes.
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,19 @@ | ||
using System.Threading.Tasks; | ||
using keyboards.ColorSpace; | ||
using keyboards.Filters; | ||
using NUnit.Framework; | ||
|
||
namespace UnitTests.Filters | ||
{ | ||
public class WashedOutTests | ||
{ | ||
[Test] | ||
public async Task IncreasesBrightness() | ||
{ | ||
var color = Hsb.Empty; | ||
var filter = new WashedOut(); | ||
var returned = await filter.ApplyFilter(new Rgb(color)); | ||
Assert.AreEqual(color.SetBrightness(1), new Hsb(returned)); | ||
} | ||
} | ||
} |
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,15 @@ | ||
using keyboards.Keyboards; | ||
using NUnit.Framework; | ||
|
||
namespace UnitTests.Keyboards | ||
{ | ||
public class MonitorTests | ||
{ | ||
[Test] | ||
public void CanBeCreated() | ||
{ | ||
var monitor = new Monitor(new FakeContainer(), null); | ||
Assert.IsTrue(monitor.Filters.Length == 0); | ||
} | ||
} | ||
} |
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 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 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 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.