-
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.
Merge pull request #2 from YellowJacketLinux/makefile
Makefile
- Loading branch information
Showing
8 changed files
with
99 additions
and
8 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,43 @@ | ||
INSTALL | ||
======= | ||
|
||
__First__, modify the `yjl-sysusers.json` file for your distribution. | ||
The current setup from github is for [YellowJacket GNU/Linux](YJL-Notes.md) | ||
which I know you are not running because I have not created an installer | ||
for YJL yet. | ||
|
||
If you are lucky, the `contrib` directory has a JSON file for your | ||
GNU/Linux distribution that you can use. | ||
|
||
See the [yjl-sysusers.json.5](docs/yjl-sysusers.json.5.md) for information | ||
about that file and valid entries. | ||
|
||
Your version must be named `yjl-sysusers.json` and in the source directory, | ||
top level where the `functions.py` file is. | ||
|
||
__Second__, test your version of the `yjl-sysusers.json` file by running | ||
the following command: | ||
|
||
python3 functions.py 000 | ||
|
||
If your JSON is valid and your properties are valid, a bunch of JSON | ||
will be dumped to screen but the exit status will be 0. | ||
|
||
If you have a mistake, there should be a human-readable error message | ||
and the exit status will be 1. | ||
|
||
__Third__, look at the Makefile and change anything that is wrong for | ||
your distribution. If your distribution is FHS compliant, nothing | ||
should need changing *unless* you want stuff put in `/usr/local`. | ||
|
||
__Fourth__, run the command | ||
|
||
make install | ||
|
||
More properly when building an RPM package etc.: | ||
|
||
DESTDIR=%{buildroot} make install | ||
|
||
__Fifth__, if your `yjl-sysusers.json` file is complete for the | ||
static UID/GID assignments of your GNU/Linux distribution, consider | ||
contacting me about adding it to the `contrib` directory. |
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,40 @@ | ||
# Python 3 required | ||
PYTHON = python3 | ||
INSTALL = /usr/bin/install | ||
CHMOD = /usr/bin/chmod | ||
SED = /usr/bin/sed | ||
RM = /bin/rm | ||
# Filesystem paths | ||
DATADIR = /usr/share | ||
MANDIR = /usr/share/man | ||
SBINDIR = /usr/sbin | ||
RPMMACRODIR = /usr/lib/rpm/macros.d | ||
|
||
dummy: | ||
echo "run make install" | ||
|
||
install: install-macros install-man install-json install-program | ||
|
||
install-macros: | ||
$(INSTALL) -Dm644 macros.yjl-sysusers $(DESTDIR)$(RPMMACRODIR)/macros.yjl-sysusers | ||
|
||
install-man: | ||
$(INSTALL) -Dm644 docs/yjl-sysusers.8 $(DESTDIR)$(MANDIR)/man8/yjl-sysusers.8 | ||
$(INSTALL) -Dm644 docs/yjl-sysusers.json.5 $(DESTDIR)$(MANDIR)/man5/yjl-sysusers.json.5 | ||
|
||
install-json: | ||
$(INSTALL) -d $(DESTDIR)$(DATADIR)/yjl-sysusers | ||
$(PYTHON) functions.py 000 > $(DESTDIR)$(DATADIR)/yjl-sysusers/yjl-sysusers.json | ||
$(CHMOD) 0444 $(DESTDIR)$(DATADIR)/yjl-sysusers/yjl-sysusers.json | ||
|
||
install-program: | ||
$(INSTALL) -d $(DESTDIR)$(SBINDIR) | ||
$(SED) -e s?"cfgdir = ''"?"cfgdir = '$(DATADIR)/yjl-sysusers'"? < functions.py > $(DESTDIR)$(SBINDIR)/yjl-sysusers | ||
$(CHMOD) 0750 $(DESTDIR)$(SBINDIR)/yjl-sysusers | ||
|
||
uninstall: | ||
$(RM) -f $(DESTDIR)$(RPMMACRODIR)/macros.yjl-sysusers | ||
$(RM) -f $(DESTDIR)$(MANDIR)/man8/yjl-sysusers.8 | ||
$(RM) -f $(DESTDIR)$(MANDIR)/man5/yjl-sysusers.json.5 | ||
$(RM) -f $(DESTDIR)$(DATADIR)/yjl-sysusers/yjl-sysusers.json | ||
$(RM) -f $(DESTDIR)$(SBINDIR)/yjl-sysusers |
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,4 @@ | ||
# Because I need something | ||
# while empty, go with Ada... | ||
*.o | ||
*.ali |
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