Skip to content

Commit

Permalink
Moving back and to more minimal solutions
Browse files Browse the repository at this point in the history
I think that this project does not need CMake, which is a large piece of
softare that is useful in cases where the code needs to run on different
environments. In this case, this code will only run in UNIX-like systems
using X11 or through Cygwin which is similar to UNIX-like environment.

I have reversed 8a8f333.

I have moved the documentation from asciidoc to mdoc, removing
the need for conversion.
  • Loading branch information
hngt committed Aug 18, 2020
1 parent 5d012cc commit fa7b859
Show file tree
Hide file tree
Showing 7 changed files with 174 additions and 424 deletions.
137 changes: 0 additions & 137 deletions .clang-format

This file was deleted.

105 changes: 0 additions & 105 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,107 +1,2 @@

# Created by https://www.gitignore.io/api/c++,makefile,cmake,qtcreator

### C++ ###
# Prerequisites
*.d

# Compiled Object files
*.slo
*.lo
*.o
*.obj

# Precompiled Headers
*.gch
*.pch

# Compiled Dynamic libraries
*.so
*.dylib
*.dll

# Fortran module files
*.mod
*.smod

# Compiled Static libraries
*.lai
*.la
*.a
*.lib

# Executables
*.exe
*.out
*.app

### CMake ###
CMakeCache.txt
CMakeFiles
CMakeScripts
Testing
Makefile
cmake_install.cmake
install_manifest.txt
compile_commands.json
CTestTestfile.cmake

#!! ERROR: makefile is undefined. Use list command to see defined gitignore types !!#

### QtCreator ###
# gitignore for Qt Creator like IDE for pure C/C++ project without Qt
#
# Reference: http://doc.qt.io/qtcreator/creator-project-generic.html



# Qt Creator autogenerated files


# A listing of all the files included in the project
*.files

# Include directories
*.includes

# Project configuration settings like predefined Macros
*.config

# Qt Creator settings
*.creator

# User project settings
*.creator.user*

# Qt Creator backups
*.autosave


# End of https://www.gitignore.io/api/c++,makefile,cmake,qtcreator

# Created by https://www.gitignore.io/api/vim

### Vim ###
# Swap
[._]*.s[a-v][a-z]
[._]*.sw[a-p]
[._]s[a-rt-v][a-z]
[._]ss[a-gi-z]
[._]sw[a-p]

# Session
Session.vim

# Temporary
.netrwhist
*~
# Auto-generated tag files
tags
# Persistent undo
[._]*.un~


# End of https://www.gitignore.io/api/vim
#
pokoy
pokoy.1
48 changes: 0 additions & 48 deletions CMakeLists.txt

This file was deleted.

36 changes: 36 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
VERSION = 0.2.5
CC ?= gcc
STRIP ?= strip
CFLAGS = -std=c99 -D_DEFAULT_SOURCE -O2
LDFLAGS = -lxcb -lxcb-keysyms -lxcb-icccm -lxcb-screensaver

SRCR = pokoy.c
OBJS = ${SRCR:.c=.o}
EXEC = pokoy

PREFIX ?= /usr/local

all: pokoy

.c.o:
${CC} ${CFLAGS} -o $@ -c $<

pokoy: ${OBJS}
${CC} ${OBJS} -o ${EXEC} ${LDFLAGS}
${STRIP} -s ${EXEC}

clean:
rm -f ./*.o ./${EXEC}

install:
install -D -m 755 pokoy ${DESTDIR}${PREFIX}/bin/pokoy
install -D -m 644 pokoyrc ${DESTDIR}${PREFIX}/share/pokoy/pokoyrc
install -D -m 644 pokoy.1 ${DESTDIR}${PREFIX}/share/man/man1/pokoy.1

uninstall:
rm -f ${DESTDIR}${PREFIX}/bin/pokoy
rm -f ${DESTDIR}${PREFIX}/share/pokoy/pokoyrc
rm -f ${DESTDIR}${PREFIX}/share/man/man1/pokoy.1


.PHONY: all clean install
10 changes: 4 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,13 @@ pokoy is lightweight daemon for X that helps prevent RSI and other computer rela
- Ubuntu:

```sh
sudo apt-get install cmake extra-cmake-modules asciidoc-base libxcb1-dev libxcb-keysyms1-dev libcxb-icccm4-dev libxcb-screensaver0-dev
sudo apt-get install libxcb1-dev libxcb-keysyms1-dev libcxb-icccm4-dev libxcb-screensaver0-dev
```

- Arch Linux

```sh
sudo pacman -S cmake extra-cmake-modules asciidoc libxcb xcb-util-keysyms xcb-util-wm
sudo pacman -S libxcb xcb-util-keysyms xcb-util-wm
```

### Runtime dependencies
Expand All @@ -34,15 +34,13 @@ pokoy is lightweight daemon for X that helps prevent RSI and other computer rela

## Building and installation

Standard CMake procedure:
Standard Makefile procedure:

```sh
mkdir build
cmake ..
sudo make install
```

If you'd like to install in other than default directory, then the last step should look like `sudo make DESTDIR=/some/install/base/dir install`.
If you'd like to install in other than default directory, then the last step should look like `sudo make PREFIX=/some/install/base/dir install`.

## Examples

Expand Down
Loading

0 comments on commit fa7b859

Please sign in to comment.