From 74276c2228fdf8079a4d1be05be3bfec7614d284 Mon Sep 17 00:00:00 2001 From: clime Date: Jul 08 2018 17:13:06 +0000 Subject: First commit --- diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..a63bec8 --- /dev/null +++ b/.gitignore @@ -0,0 +1,2 @@ +main.o +main diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..0dc2852 --- /dev/null +++ b/Makefile @@ -0,0 +1,15 @@ +CC=gcc +ARGS=-Wall -g + +all: main.o + ${CC} ${ARGS} -o main main.o + +main.o: main.c + ${CC} ${ARGS} -c main.c + +install: + mkdir -p $(root)/usr/bin + cp main $(root)/usr/bin/hello_rpkg + +clean: + rm main *.o diff --git a/hello_rpkg.spec.rpkg b/hello_rpkg.spec.rpkg new file mode 100644 index 0000000..1b203e8 --- /dev/null +++ b/hello_rpkg.spec.rpkg @@ -0,0 +1,56 @@ +# The following tag is to get correct syntax highlighting for this file in vim text editor +# vim: syntax=spec + +# git_name returns repository name derived from remote Git repository URL +Name: {{{ git_name }}} + +# git_version returns version based on commit and tag history of the Git project +Version: {{{ git_version }}} + +# This can be useful later for adding downstream patches +Release: 1%{?dist} + +# Basic description of the package +Summary: Hello rpkg package. + +# Licence. Hopefully free or at least open-source. We assume GPLv2+ here. +License: GPLv2+ + +# Home page of the project. Can also point to the public Git repository page. +URL: https://pagure.io/hello_rpkg + +# Detailed information about the source Git repository and the source commit +# for the created rpm package +VCS: {{{ git_vcs }}} + +# git_pack macro places the repository content (the source files) into a tarball +# and returns its filename. The tarball will be used to build the rpm. +Source: {{{ git_pack }}} + +# More detailed description of the package +%description +This is a hello world package. + +# The following four sections already describe the rpm build process itself. +# prep will extract the tarball defined as Source above and descend into it. +%prep +{{{ git_setup_macro }}} + +# This will invoke `make` command in the directory with the extracted sources. +%build +make + +# This will copy the files generated by the `make` command above into +# the installable rpm package. +%install +make install root=%{buildroot} + +# This lists all the files that are included in the rpm package and that +# are going to be installed into target system where the rpm is installed. +%files +/usr/bin/hello_rpkg + +# Finally, changes from the latest release of your application are generated from +# your project's Git history. It will be empty until you make first annotated Git tag. +%changelog +{{{ git_changelog }}} diff --git a/main.c b/main.c new file mode 100644 index 0000000..aeed942 --- /dev/null +++ b/main.c @@ -0,0 +1,7 @@ +#include + +int main() +{ + printf("%s", "Hello rpkg!\n"); + return 0; +}