diff options
author | Julian Eigmüller | 2022-01-12 21:04:50 +0100 |
---|---|---|
committer | Julian Eigmüller | 2022-01-12 21:04:50 +0100 |
commit | 7a43131a25c90152ac614bef59c29c1914ed6ea8 (patch) | |
tree | a61c34aa526b9f919959270b4d2f6abaaaca91ba | |
parent | 61a642f354fff5a3d217fab6bc46bb61befdcbfe (diff) | |
download | aur-7a43131a25c90152ac614bef59c29c1914ed6ea8.tar.gz |
Update to term-sudoku 1.1, implement CMake build
-rw-r--r-- | .SRCINFO | 6 | ||||
-rw-r--r-- | PKGBUILD | 13 | ||||
-rw-r--r-- | README.md | 68 |
3 files changed, 12 insertions, 75 deletions
@@ -1,13 +1,15 @@ pkgbase = term-sudoku pkgdesc = Play sudoku in your terminal. - pkgver = 1.0 + pkgver = 1.1 pkgrel = 1 url = https://github.com/theeyeofcthulhu/term-sudoku arch = any license = GPL makedepends = git + makedepends = make + makedepends = cmake depends = ncurses - source = https://github.com/theeyeofcthulhu/term-sudoku/archive/refs/tags/v1.0.tar.gz + source = https://github.com/theeyeofcthulhu/term-sudoku/archive/refs/tags/v1.1.tar.gz sha1sums = SKIP pkgname = term-sudoku @@ -1,22 +1,25 @@ pkgname='term-sudoku' -pkgver='1.0' +pkgver='1.1' pkgrel=1 pkgdesc='Play sudoku in your terminal.' arch=('any') url='https://github.com/theeyeofcthulhu/term-sudoku' license=('GPL') -makedepends=('git') +makedepends=('git' 'make' 'cmake') depends=('ncurses') source=("https://github.com/theeyeofcthulhu/term-sudoku/archive/refs/tags/v$pkgver.tar.gz") sha1sums=('SKIP') build() { cd $srcdir/$pkgname-$pkgver + mkdir build + cd build + cmake -DCMAKE_INSTALL_PREFIX=/usr .. make } package() { - cd $srcdir/$pkgname-$pkgver - make PREFIX=/usr DESTDIR="${pkgdir}" install - install -Dm644 README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md" + cd $srcdir/$pkgname-$pkgver/build + make DESTDIR="${pkgdir}" install + install -Dm644 ../README.md "${pkgdir}/usr/share/doc/${pkgname}/README.md" } diff --git a/README.md b/README.md deleted file mode 100644 index 858b59dbee23..000000000000 --- a/README.md +++ /dev/null @@ -1,68 +0,0 @@ -# Term-Sudoku - -This is a terminal application to play the game of Sudoku. - -## Build - -### Prerequisites - -- ncurses -- dialog for filechoosing - -### Makefile - -`$ make build` - -creates a "bin" folder with the binary. - -`$ make install` - -copies that binary to /usr/local/bin. - -## AUR - -Install via (using paru) - -`$ paru -Syu term-sudoku` - -## Usage - -When you start the program with - -`$ make run` or `$ bin/term-sudoku` - -a sudoku is generated for you (run with '-v' flag to see that process). -Using the controls displayed on the screen insert numbers. -It's going to look like this: - -![Example](https://raw.githubusercontent.com/theeyeofcthulhu/term-sudoku/master/example.png) - -When you save with s a file like this is generated (the first line is the -puzzle and the second is the solution the use fill in): - -``` -000260701680070090190004500820100040004602900050003028009300074040050036703018000 -000000000000000000000000000000000000000000000000000000000000000000000000000000000 -``` - -Continue where you left of with - -`$ bin/term-sudoku -f your_file` - -See more flags and help with the -h flag. - -You start in "normal mode". Meaning you type in numbers for the solution -into the grid. When pressing e you get into "Note Mode", where you can -note numbers that would fit into that square. Every number there is like -a switch: press a number to toggle it's visibility as a note. - -## Generation of the Sudoku - -To see this process run with -v flag. What happens is from left to right -and top to bottom the first three blocks are filled with the values 1 to 9 -randomly. This pattern follows the sudoku rules as no vertical or horizontal -lines interfere. Then, using backtracking the rest of the squares are filled, -leaving us with a fully filled sudoku grid. Afterwards numbers are removed one -by one and, using backtracking, the solutions to the puzzle with the removed -numbers are counted. Once there is more than one solution the removal is -stopped. |