From 2a11c862ddce9fb0b44ae74e84befb372b502935 Mon Sep 17 00:00:00 2001 From: Louie Shprung Date: Sat, 24 Dec 2022 09:11:46 -0800 Subject: Improved README detail and added instructions for building rpm --- README | 38 +++++++++++++++++++++++++++++++++++--- simple-snake.spec | 37 +++++++++++++++++++++++++++++++++++++ 2 files changed, 72 insertions(+), 3 deletions(-) create mode 100644 simple-snake.spec diff --git a/README b/README index 504f8c2..15c203e 100644 --- a/README +++ b/README @@ -7,9 +7,41 @@ $ make The resulting binary will be created in src/ --- Creating binary deb package -- +-- Creating deb package -- -Rename working directory to PACKAGE-VERSION: something like "simple-snake-0.1" +Build the dist archive, and move it up one directory. ARCHIVE will be something like `simple-snake-0.1.tar.gz` + +$ ./configure +$ make dist +$ mv ARCHIVE .. + +Rename the project directory to match the ARCHIVE (i.e., if ARCHIVE is `simple-snake-0.1.tar.gz`, rename the project directory to `simple-snake-0.1`) + +Now, update the `debian` directory and build $ debmake -e EMAIL -f FULLNAME -$ dpkg-buildpackage -b +$ debuild + +The resulting package will be created in the same directory as ARCHIVE was placed + +-- Creating rpm package -- + +If this is your first time building an rpm package: + +$ rpmdev-setuptree + +Now, build the dist archive, and move it to SOURCES. ARCHIVE will be something like `simple-snake-0.1.tar.gz` + +$ ./configure +$ make dist +$ mv ARCHIVE ~/rpmbuild/SOURCES + +Copy the spec file to SPECS + +$ cp simple-snake.spec ~/rpmbuild/SPECS + +Build the package + +$ rpmbuild -ba ~/rpmbuild/SPECS/simple-snake.spec + +The resulting package will be created under `~/rpmbuild/RPMS` diff --git a/simple-snake.spec b/simple-snake.spec new file mode 100644 index 0000000..38b18e0 --- /dev/null +++ b/simple-snake.spec @@ -0,0 +1,37 @@ +Name: simple-snake +Version: 0.1 +Release: 1%{?dist} +Summary: simple ncurses snake game +License: Unlicense +URL: https://github.com/lshprung/simple-snake +Source0: %{name}-%{version}.tar.gz + +BuildRequires: gcc make ncurses-devel +Requires: ncurses + +%description +ncurses snake game where the only boundaries are +the terminal window. + +%prep +%autosetup + + +%build +%configure +%make_build + + +%install +rm -rf $RPM_BUILD_ROOT +%make_install + + +%files +%{_bindir}/%{name} +%{_docdir}/%{name}/README + + +%changelog +* Sat Dec 24 2022 builder +- -- cgit