# The following tag is to get correct syntax highlighting for this file in vim text editor # vim: syntax=spec # ignore lack of debug symbols %global debug_package %{nil} # git_dir_name returns repository name derived from remote Git repository URL Name: backlight_brightness # git_dir_version returns version based on commit and tag history of the Git project Version: 0.0.git.11.d1ad726 # This can be useful later for adding downstream patches Release: 1%{?dist} # Basic description of the package Summary: Backlight brightness adjustment # License. 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://github.com/joshgordon/backlight_brightness BuildRequires: golang > 1.12 # Detailed information about the source Git repository and the source commit # for the created rpm package VCS: git+https://github.com/joshgordon/backlight_brightness#d1ad72681b740f3af9888d4ea920e28cb54cfdc6: # git_dir_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: backlight_brightness-0.0.git.11.d1ad726.tar.gz # More detailed description of the package %description Custom-written backlight brightness adjustment for my laptop. Uses some pretty simple exponent math to minimize the number of brightness steps. Written because my chromebook had a stupid number of steps when I was running linux on that, but I still use it because I like the way it works. # 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 %setup -q -n backlight_brightness-0.0.git.11.d1ad726 # This will invoke `make` command in the directory with the extracted sources. %build go build brightness.go # This will copy the files generated by the `make` command above into # the installable rpm package. %install mkdir -p %{buildroot}/usr/bin cp brightness %{buildroot}/usr/bin/brightness chmod u+s %{buildroot}/usr/bin/brightness # 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/brightness # 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