Name: newfile Version: 0.2.0 Release: %autorelease Summary: Atomically create a file with its mode, owner, size and content set License: BSD-3-Clause URL: https://github.com/arixsnow/newfile Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz BuildRequires: gcc %description newfile creates a file with its permission mode, owner, size and initial content already set. The file appears with all of them in place, or it does not appear at all. An existing path is never replaced unless -f is given, and a replacement is committed with rename(2). %prep %autosetup # The Makefile prepends -std=c99 and -fPIE to CFLAGS, and -pie to LDFLAGS. # The language standard is required to build, and -pie without -fPIE does # not link. Everything else comes from the build flags unchanged. %build %make_build %install %make_install PREFIX=%{_prefix} %check %make_build check %files %dir %{_licensedir}/%{name} %license %{_licensedir}/%{name}/LICENSE %doc README.md ChangeLog %{_bindir}/%{name} %{_mandir}/man1/%{name}.1* %changelog %autochangelog