modules/rpm: add example

Signed-off-by: Igor Gnatenko <i.gnatenko.brain@gmail.com>
pull/52/head
Igor Gnatenko 10 years ago
parent be7bea6b08
commit bcf6ff15a4
  1. 6
      manual tests/4 rpm/lib.c
  2. 1
      manual tests/4 rpm/lib.h
  3. 8
      manual tests/4 rpm/main.c
  4. 13
      manual tests/4 rpm/meson.build

@ -0,0 +1,6 @@
#include"lib.h"
char *meson_print(void)
{
return "Hello, world!";
}

@ -0,0 +1 @@
char *meson_print(void);

@ -0,0 +1,8 @@
#include<lib.h>
#include<stdio.h>
int main(int argc, char **argv)
{
char *t = meson_print();
printf("%s", t);
return 0;
}

@ -0,0 +1,13 @@
project('test spec', 'c')
rpm = import('rpm')
dependency('zlib')
lib = shared_library('mesontest_shared', ['lib.c', 'lib.h'],
version : '0.1', soversion : '0',
install : true)
executable('mesontest-bin', 'main.c',
link_with : lib,
install : true)
rpm.generate_spec()
Loading…
Cancel
Save