-
Notifications
You must be signed in to change notification settings - Fork 104
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 #853 from sappo/master
New snippet interface
- Loading branch information
Showing
16 changed files
with
304 additions
and
158 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
Empty file.
Empty file.
Empty file.
Empty file.
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
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 was deleted.
Oops, something went wrong.
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,86 @@ | ||
# Generate systemd snippets and files for zproject | ||
# | ||
# This is a code generator built using the iMatix GSL code generation | ||
# language. See https://github.com/imatix/gsl for details. | ||
# | ||
# Copyright (c) the Contributors as noted in the AUTHORS file. | ||
# This file is part of zproject. | ||
# | ||
# This Source Code Form is subject to the terms of the Mozilla Public | ||
# License, v. 2.0. If a copy of the MPL was not distributed with this | ||
# file, You can obtain one at http://mozilla.org/MPL/2.0/. | ||
# | ||
|
||
register_snippet("configure.ac", "systemd") | ||
function snippet_configure_ac_systemd () | ||
for project.main where defined (main->install) | ||
for install | ||
if install.type = "systemd-tmpfiles" | ||
>AM_COND_IF([WITH_SYSTEMD_UNITS], | ||
> [AC_CONFIG_FILES([ | ||
> src/$(main.name).conf | ||
> ])], | ||
> []) | ||
> | ||
elsif install.type = "config" | ||
>AC_CONFIG_FILES([ | ||
> src/$(main.name).cfg | ||
>]) | ||
> | ||
endif | ||
endfor | ||
endfor | ||
endfunction | ||
|
||
register_snippet("Makemodule", "systemd") | ||
function snippet_makemodule_systemd () | ||
for project.main where defined (main->install) | ||
for install | ||
if install.type = "systemd-tmpfiles" | ||
>if ENABLE_$(MAIN.NAME:c) | ||
>if WITH_SYSTEMD_UNITS | ||
>$(main.name:c)_tmpfiles_ddir = /usr/lib/tmpfiles.d/ | ||
>$(main.name:c)_tmpfiles_d_DATA = src/$(main.name).conf | ||
>endif #WITH_SYSTEMD_UNITS | ||
>endif #$(MAIN.NAME:c) | ||
> | ||
elsif install.type = "config" | ||
>if ENABLE_$(MAIN.NAME:c) | ||
>src_$(project.name:c)_config_DATA += src/$(main.name).cfg | ||
>endif | ||
> | ||
endif | ||
endfor | ||
endfor | ||
endfunction | ||
|
||
register_snippet("redhat.spec", "systemd") | ||
function snippet_redhat_spec_systemd () | ||
for project.main where defined (main->install) | ||
for install | ||
if install.type = "systemd-tmpfiles" | ||
>AM_COND_IF([WITH_SYSTEMD_UNITS], | ||
>%dir /usr/lib/tmpfiles.d/ | ||
>%config /usr/lib/tmpfiles.d/$(main.name).conf | ||
> | ||
elsif install.type = "config" | ||
>%config (noreplace) %{sysconfdir}/$(project.name)/$(main.name).cfg | ||
> | ||
endif | ||
endfor | ||
endfor | ||
endfunction | ||
|
||
register_snippet("debian.install", "systemd") | ||
function snippet_debian_install_systemd () | ||
for project.main where defined (main->install) | ||
for install | ||
if install.type = "systemd-tmpfiles" | ||
>usr/lib/tmpfiles.d/$(main.name).conf | ||
> | ||
elsif install.type = "config" | ||
>etc/$(project.name)/$(main.name).cfg | ||
endif | ||
endfor | ||
endfor | ||
endfunction |