diff --git a/autospec/testfiles/c-helloworld/Makefile b/autospec/testfiles/c-helloworld/Makefile new file mode 100644 index 0000000..d8ca5e9 --- /dev/null +++ b/autospec/testfiles/c-helloworld/Makefile @@ -0,0 +1,9 @@ +DESTDIR ?= +PREFIX ?= /usr/local + +helloworld: + gcc main.c -o helloworld + +install: helloworld + install -m 0755 -d $(DESTDIR)$(PREFIX)/bin + install -m 0755 helloworld $(DESTDIR)$(PREFIX)/bin diff --git a/autospec/testfiles/c-helloworld/autospecdir/buildreq_add b/autospec/testfiles/c-helloworld/autospecdir/buildreq_add new file mode 100644 index 0000000..8007d88 --- /dev/null +++ b/autospec/testfiles/c-helloworld/autospecdir/buildreq_add @@ -0,0 +1,3 @@ +# This file contains additional build requirements that did not get +# picked up automatically. One name per line, no whitespace. +xz diff --git a/autospec/testfiles/c-helloworld/autospecdir/buildreq_ban b/autospec/testfiles/c-helloworld/autospecdir/buildreq_ban new file mode 100644 index 0000000..bf7accf --- /dev/null +++ b/autospec/testfiles/c-helloworld/autospecdir/buildreq_ban @@ -0,0 +1,2 @@ +# This file contains build requirements that get picked up but are +# undesirable. One entry per line, no whitespace. diff --git a/autospec/testfiles/c-helloworld/autospecdir/c-helloworld.license b/autospec/testfiles/c-helloworld/autospecdir/c-helloworld.license new file mode 100644 index 0000000..e219275 --- /dev/null +++ b/autospec/testfiles/c-helloworld/autospecdir/c-helloworld.license @@ -0,0 +1 @@ +GPL-3.0 diff --git a/autospec/testfiles/c-helloworld/autospecdir/pkgconfig_add b/autospec/testfiles/c-helloworld/autospecdir/pkgconfig_add new file mode 100644 index 0000000..dd3b77c --- /dev/null +++ b/autospec/testfiles/c-helloworld/autospecdir/pkgconfig_add @@ -0,0 +1,2 @@ +# This file contains additional pkgconfig build requirements that did +# not get picked up automatically. One name per line, no whitespace. diff --git a/autospec/testfiles/c-helloworld/autospecdir/pkgconfig_ban b/autospec/testfiles/c-helloworld/autospecdir/pkgconfig_ban new file mode 100644 index 0000000..859fae4 --- /dev/null +++ b/autospec/testfiles/c-helloworld/autospecdir/pkgconfig_ban @@ -0,0 +1,2 @@ +# This file contains pkgconfig build requirements that get picked up +# but are undesirable. One entry per line, no whitespace. diff --git a/autospec/testfiles/c-helloworld/expectations.py b/autospec/testfiles/c-helloworld/expectations.py new file mode 100644 index 0000000..7e85ae5 --- /dev/null +++ b/autospec/testfiles/c-helloworld/expectations.py @@ -0,0 +1,13 @@ +""" +This file, expectations.py, defines expected test results and is not added to +the test source tarball. +""" +import os + +buildreqs = ['xz'] +license = 'GPL-3.0' +with open('testfiles/c-helloworld/spec-expectations', 'r') as spec: + specfile = spec.read() + +specfile = specfile.replace('{}', os.getcwd()).split('\n') +output_strings = [] diff --git a/autospec/testfiles/c-helloworld/main.c b/autospec/testfiles/c-helloworld/main.c new file mode 100644 index 0000000..2d63c24 --- /dev/null +++ b/autospec/testfiles/c-helloworld/main.c @@ -0,0 +1,3 @@ +#include +int main(){printf("Hello World\n");} + diff --git a/autospec/testfiles/c-helloworld/spec-expectations b/autospec/testfiles/c-helloworld/spec-expectations new file mode 100644 index 0000000..182b639 --- /dev/null +++ b/autospec/testfiles/c-helloworld/spec-expectations @@ -0,0 +1,31 @@ +# +# This file is auto-generated. DO NOT EDIT +# Generated by: autospec.py +# +Name : c-helloworld +Version : 1 +Release : 1 +URL : file://{}/testfiles/c-helloworld.tar.gz +Source0 : file://{}/testfiles/c-helloworld.tar.gz +Summary : No detailed summary available +Group : Development/Tools +License : GPL-3.0 +BuildRequires : xz + +%description +No detailed description available + +%prep +%setup -q -n c-helloworld + +%build +export LANG=C +make V=1 %{?_smp_mflags} + +%install +rm -rf %{buildroot} +%make_install + +%files +%defattr(-,root,root,-) +/usr/local/bin/helloworld