summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Haller <thaller@redhat.com>2016-02-17 11:38:40 +0100
committerThomas Haller <thaller@redhat.com>2016-02-17 11:44:09 +0100
commit06857805664153407d25b50f0412009ab7800a0a (patch)
tree05ccc4baf498efded7ef53e29b879c911190e8fa
parent6dc431b0c970f9b5344c40d0d608232e2b63549a (diff)
downloadNetworkManager-06857805664153407d25b50f0412009ab7800a0a.tar.gz
contrib/rpm: add README, improve usage output and rename --no-build option to --no-dist
-rw-r--r--contrib/fedora/rpm/README23
-rwxr-xr-xcontrib/fedora/rpm/build_clean.sh15
2 files changed, 32 insertions, 6 deletions
diff --git a/contrib/fedora/rpm/README b/contrib/fedora/rpm/README
new file mode 100644
index 0000000000..4e17397be5
--- /dev/null
+++ b/contrib/fedora/rpm/README
@@ -0,0 +1,23 @@
+# To build RPM packages for Fedora derivates directly from git, just do:
+
+
+#
+# preparation:
+#
+git clone git://anongit.freedesktop.org/NetworkManager/NetworkManager
+cd NetworkManager
+git checkout $WHATEVER
+sudo sh ./contrib/fedora/REQUIRED_PACKAGES
+
+
+#
+# build the packages. Pass --help for usage help.
+#
+./contrib/fedora/rpm/build_clean.sh
+
+
+#
+# install
+#
+sudo dnf install ./contrib/fedora/rpm/latest/RPMS/x86_64/*rpm
+
diff --git a/contrib/fedora/rpm/build_clean.sh b/contrib/fedora/rpm/build_clean.sh
index 5a3f05ede0..c0e0cbd85b 100755
--- a/contrib/fedora/rpm/build_clean.sh
+++ b/contrib/fedora/rpm/build_clean.sh
@@ -7,15 +7,18 @@ die() {
}
usage() {
- echo "USAGE: $0 [-h|--help|-?|help] [-f|--force] [-c|--clean] [-Q|--quick]"
+ echo "USAGE: $0 [-h|--help|-?|help] [-f|--force] [-c|--clean] [-Q|--quick] [-S|--srpm] [-N|--no-dist] [[-w|--with OPTION] ...] [[-W|--without OPTION] ...]"
echo
- echo "Does all the steps from a clean working directory to an RPM of NetworkManager"
+ echo "Does all the steps from a clean git working directory to an RPM of NetworkManager"
echo
echo "Options:"
echo " --force: force build, even if working directory is not clean and has local modifications"
echo " --clean: run \`git-clean -fdx :/\` before build"
echo " --quick: only run \`make dist\` instead of \`make distcheck\`"
echo " --srpm: only build the SRPM"
+ echo " --no-dist: skip creating the source tarball if you already did \`make dist\`"
+ echo " --with \$OPTION: pass --with \$OPTION to rpmbuild. For example --with debug"
+ echo " --without \$OPTION: pass --without \$OPTION to rpmbuild. For example --without debug"
}
@@ -31,7 +34,7 @@ cd "$GITDIR" || die "could not change to $GITDIR"
IGNORE_DIRTY=0
GIT_CLEAN=0
QUICK=0
-NO_BUILD=0
+NO_DIST=0
WITH_LIST=()
_next_with=
@@ -58,8 +61,8 @@ for A; do
-S|--srpm)
BUILDTYPE=SRPM
;;
- -N|--no-build)
- NO_BUILD=1
+ -N|--no-dist)
+ NO_DIST=1
IGNORE_DIRTY=1
;;
-w|--with)
@@ -93,7 +96,7 @@ if [[ $IGNORE_DIRTY != 1 ]]; then
fi
fi
-if [[ $NO_BUILD != 1 ]]; then
+if [[ $NO_DIST != 1 ]]; then
./autogen.sh --enable-gtk-doc || die "Error autogen.sh"
if [[ $QUICK == 1 ]]; then