summaryrefslogtreecommitdiffstats
path: root/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'scripts')
-rw-r--r--scripts/libmakepkg/integrity/meson.build20
-rw-r--r--scripts/libmakepkg/lint_config/meson.build18
-rw-r--r--scripts/libmakepkg/lint_package/meson.build20
-rw-r--r--scripts/libmakepkg/lint_pkgbuild/meson.build37
-rw-r--r--scripts/libmakepkg/meson.build31
-rw-r--r--scripts/libmakepkg/source/meson.build22
-rw-r--r--scripts/libmakepkg/tidy/meson.build23
-rw-r--r--scripts/libmakepkg/util/meson.build24
-rw-r--r--scripts/meson.build66
-rw-r--r--scripts/po/meson.build15
10 files changed, 276 insertions, 0 deletions
diff --git a/scripts/libmakepkg/integrity/meson.build b/scripts/libmakepkg/integrity/meson.build
new file mode 100644
index 00000000..9aa9061c
--- /dev/null
+++ b/scripts/libmakepkg/integrity/meson.build
@@ -0,0 +1,20 @@
+libmakepkg_module = 'integrity'
+
+sources = [
+ 'generate_checksum.sh.in',
+ 'generate_signature.sh.in',
+ 'verify_checksum.sh.in',
+ 'verify_signature.sh.in',
+]
+
+foreach src : sources
+ output_dir = join_paths(get_option('datadir'), 'makepkg', libmakepkg_module)
+
+ custom_target(
+ libmakepkg_module + '_' + src.underscorify(),
+ command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@' ],
+ input : src,
+ output : '@BASENAME@',
+ install : true,
+ install_dir : output_dir)
+endforeach
diff --git a/scripts/libmakepkg/lint_config/meson.build b/scripts/libmakepkg/lint_config/meson.build
new file mode 100644
index 00000000..884d63d7
--- /dev/null
+++ b/scripts/libmakepkg/lint_config/meson.build
@@ -0,0 +1,18 @@
+libmakepkg_module = 'lint_config'
+
+sources = [
+ 'paths.sh.in',
+ 'variable.sh.in',
+]
+
+foreach src : sources
+ output_dir = join_paths(get_option('datadir'), 'makepkg', libmakepkg_module)
+
+ custom_target(
+ libmakepkg_module + '_' + src.underscorify(),
+ command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@' ],
+ input : src,
+ output : '@BASENAME@',
+ install : true,
+ install_dir : output_dir)
+endforeach
diff --git a/scripts/libmakepkg/lint_package/meson.build b/scripts/libmakepkg/lint_package/meson.build
new file mode 100644
index 00000000..8eb1aaf7
--- /dev/null
+++ b/scripts/libmakepkg/lint_package/meson.build
@@ -0,0 +1,20 @@
+libmakepkg_module = 'lint_package'
+
+sources = [
+ 'build_references.sh.in',
+ 'dotfiles.sh.in',
+ 'file_names.sh.in',
+ 'missing_backup.sh.in',
+]
+
+foreach src : sources
+ output_dir = join_paths(get_option('datadir'), 'makepkg', libmakepkg_module)
+
+ custom_target(
+ libmakepkg_module + '_' + src.underscorify(),
+ command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@' ],
+ input : src,
+ output : '@BASENAME@',
+ install : true,
+ install_dir : output_dir)
+endforeach
diff --git a/scripts/libmakepkg/lint_pkgbuild/meson.build b/scripts/libmakepkg/lint_pkgbuild/meson.build
new file mode 100644
index 00000000..9067c9d6
--- /dev/null
+++ b/scripts/libmakepkg/lint_pkgbuild/meson.build
@@ -0,0 +1,37 @@
+libmakepkg_module = 'lint_pkgbuild'
+
+sources = [
+ 'arch.sh.in',
+ 'backup.sh.in',
+ 'changelog.sh.in',
+ 'checkdepends.sh.in',
+ 'conflicts.sh.in',
+ 'depends.sh.in',
+ 'epoch.sh.in',
+ 'install.sh.in',
+ 'makedepends.sh.in',
+ 'optdepends.sh.in',
+ 'options.sh.in',
+ 'package_function.sh.in',
+ 'pkgbase.sh.in',
+ 'pkglist.sh.in',
+ 'pkgname.sh.in',
+ 'pkgrel.sh.in',
+ 'pkgver.sh.in',
+ 'provides.sh.in',
+ 'source.sh.in',
+ 'util.sh.in',
+ 'variable.sh.in',
+]
+
+foreach src : sources
+ output_dir = join_paths(get_option('datadir'), 'makepkg', libmakepkg_module)
+
+ custom_target(
+ libmakepkg_module + '_' + src.underscorify(),
+ command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@' ],
+ input : src,
+ output : '@BASENAME@',
+ install : true,
+ install_dir : output_dir)
+endforeach
diff --git a/scripts/libmakepkg/meson.build b/scripts/libmakepkg/meson.build
new file mode 100644
index 00000000..07475b4d
--- /dev/null
+++ b/scripts/libmakepkg/meson.build
@@ -0,0 +1,31 @@
+libmakepkg_modules = [
+ { 'name' : 'integrity', 'has_subdir' : true },
+ { 'name' : 'lint_config', 'has_subdir' : true },
+ { 'name' : 'lint_package', 'has_subdir' : true },
+ { 'name' : 'lint_pkgbuild', 'has_subdir' : true },
+ { 'name' : 'source', 'has_subdir' : true },
+ { 'name' : 'srcinfo', },
+ { 'name' : 'tidy', 'has_subdir' : true },
+ { 'name' : 'util', 'has_subdir' : true },
+]
+
+mkdir_p = 'mkdir -p $DESTDIR/@0@'
+
+foreach module : libmakepkg_modules
+ custom_target(
+ 'libmakepkg_@0@'.format(module['name']),
+ command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@' ],
+ input : '@0@.sh.in'.format(module['name']),
+ output : '@BASENAME@',
+ install : true,
+ install_dir : join_paths(get_option('datadir'), 'makepkg'))
+
+ if module.get('has_subdir', false)
+ subdir(module['name'])
+ path = join_paths(get_option('prefix'),
+ get_option('datadir'),
+ 'makepkg',
+ module['name'])
+ meson.add_install_script('sh', '-c', mkdir_p.format(path))
+ endif
+endforeach
diff --git a/scripts/libmakepkg/source/meson.build b/scripts/libmakepkg/source/meson.build
new file mode 100644
index 00000000..59326133
--- /dev/null
+++ b/scripts/libmakepkg/source/meson.build
@@ -0,0 +1,22 @@
+libmakepkg_module = 'source'
+
+sources = [
+ 'bzr.sh.in',
+ 'file.sh.in',
+ 'git.sh.in',
+ 'hg.sh.in',
+ 'local.sh.in',
+ 'svn.sh.in',
+]
+
+foreach src : sources
+ output_dir = join_paths(get_option('datadir'), 'makepkg', libmakepkg_module)
+
+ custom_target(
+ libmakepkg_module + '_' + src.underscorify(),
+ command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@' ],
+ input : src,
+ output : '@BASENAME@',
+ install : true,
+ install_dir : output_dir)
+endforeach
diff --git a/scripts/libmakepkg/tidy/meson.build b/scripts/libmakepkg/tidy/meson.build
new file mode 100644
index 00000000..052ac7a2
--- /dev/null
+++ b/scripts/libmakepkg/tidy/meson.build
@@ -0,0 +1,23 @@
+libmakepkg_module = 'tidy'
+
+sources = [
+ 'docs.sh.in',
+ 'emptydirs.sh.in',
+ 'libtool.sh.in',
+ 'purge.sh.in',
+ 'staticlibs.sh.in',
+ 'strip.sh.in',
+ 'zipman.sh.in',
+]
+
+foreach src : sources
+ output_dir = join_paths(get_option('datadir'), 'makepkg', libmakepkg_module)
+
+ custom_target(
+ libmakepkg_module + '_' + src.underscorify(),
+ command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@' ],
+ input : src,
+ output : '@BASENAME@',
+ install : true,
+ install_dir : output_dir)
+endforeach
diff --git a/scripts/libmakepkg/util/meson.build b/scripts/libmakepkg/util/meson.build
new file mode 100644
index 00000000..b0e829c4
--- /dev/null
+++ b/scripts/libmakepkg/util/meson.build
@@ -0,0 +1,24 @@
+libmakepkg_module = 'util'
+
+sources = [
+ 'compress.sh.in',
+ 'error.sh.in',
+ 'message.sh.in',
+ 'option.sh.in',
+ 'parseopts.sh.in',
+ 'pkgbuild.sh.in',
+ 'source.sh.in',
+ 'util.sh.in',
+]
+
+foreach src : sources
+ output_dir = join_paths(get_option('datadir'), 'makepkg', libmakepkg_module)
+
+ custom_target(
+ libmakepkg_module + '_' + src.underscorify(),
+ command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@' ],
+ input : src,
+ output : '@BASENAME@',
+ install : true,
+ install_dir : output_dir)
+endforeach
diff --git a/scripts/meson.build b/scripts/meson.build
new file mode 100644
index 00000000..1fe3fb78
--- /dev/null
+++ b/scripts/meson.build
@@ -0,0 +1,66 @@
+scripts = [
+ 'makepkg-template.pl.in',
+ 'makepkg.sh.in',
+ 'pacman-db-upgrade.sh.in',
+ 'pacman-key.sh.in',
+ 'pkgdelta.sh.in',
+ 'repo-add.sh.in'
+]
+
+library_files = [
+ 'library/human_to_size.sh',
+ 'library/size_to_human.sh',
+]
+
+SCRIPT_EDITOR = find_program(configure_file(
+ input : join_paths(meson.source_root(), 'build-aux/edit-script.sh.in'),
+ output : 'edit-script.sh',
+ configuration : substs))
+
+m4_edit = generator(
+ M4,
+ arguments : ['-P', '-I', meson.current_source_dir(), '@INPUT@'],
+ output : '@PLAINNAME@',
+ capture : true)
+
+foreach script : scripts
+ custom_target(
+ script,
+ input : m4_edit.process(script),
+ command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@', '0755'],
+ output : script.split('.')[0],
+ depend_files : library_files,
+ install : true,
+ install_dir : get_option('bindir'))
+endforeach
+
+foreach symlink : ['repo-remove', 'repo-elephant']
+ meson.add_install_script(MESON_MAKE_SYMLINK,
+ 'repo-add',
+ join_paths(BINDIR, symlink))
+endforeach
+
+subdir('libmakepkg')
+
+custom_target(
+ 'bash_completion',
+ command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@' ],
+ input : 'completion/bash_completion.in',
+ output : 'pacman',
+ install : true,
+ install_dir : BASHCOMPDIR)
+
+foreach symlink : ['pacman-key', 'makepkg']
+ meson.add_install_script(MESON_MAKE_SYMLINK,
+ 'pacman',
+ join_paths(BASHCOMPDIR, symlink))
+endforeach
+
+zsh_completion_dir = join_paths(DATAROOTDIR, 'zsh/site-functions')
+custom_target(
+ 'zsh_completion',
+ command : [ SCRIPT_EDITOR, '@INPUT@', '@OUTPUT@' ],
+ input : 'completion/zsh_completion.in',
+ output : '_pacman',
+ install : true,
+ install_dir : zsh_completion_dir)
diff --git a/scripts/po/meson.build b/scripts/po/meson.build
new file mode 100644
index 00000000..d8b8c51c
--- /dev/null
+++ b/scripts/po/meson.build
@@ -0,0 +1,15 @@
+i18n.gettext(
+ 'pacman-scripts',
+ args : [
+ '--directory=@0@'.format(meson.current_source_dir()),
+ '--msgid-bugs-address=http://bugs.archlinux.org/index.php?project=3',
+ '--copyright-holder="Pacman Development Team <pacman-dev@archlinux.org>"',
+ '--language', 'shell',
+
+ '--keyword=_',
+ '--flag=_:1:c-format',
+
+ '--keyword=_n:1,2',
+ '--flag=_n:1:c-format',
+ '--flag=_n:2:c-format',
+ ])