mirror of
https://github.com/clearlinux/autospec.git
synced 2026-08-21 14:47:18 +00:00
Add simple c-helloworld source for tests
Signed-off-by: Matthew Johnson <matthew.johnson@intel.com>
This commit is contained in:
@@ -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
|
||||
@@ -0,0 +1,3 @@
|
||||
# This file contains additional build requirements that did not get
|
||||
# picked up automatically. One name per line, no whitespace.
|
||||
xz
|
||||
@@ -0,0 +1,2 @@
|
||||
# This file contains build requirements that get picked up but are
|
||||
# undesirable. One entry per line, no whitespace.
|
||||
@@ -0,0 +1 @@
|
||||
GPL-3.0
|
||||
@@ -0,0 +1,2 @@
|
||||
# This file contains additional pkgconfig build requirements that did
|
||||
# not get picked up automatically. One name per line, no whitespace.
|
||||
@@ -0,0 +1,2 @@
|
||||
# This file contains pkgconfig build requirements that get picked up
|
||||
# but are undesirable. One entry per line, no whitespace.
|
||||
@@ -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 = []
|
||||
@@ -0,0 +1,3 @@
|
||||
#include<stdio.h>
|
||||
int main(){printf("Hello World\n");}
|
||||
|
||||
@@ -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
|
||||
Reference in New Issue
Block a user