Another fixes in release scripts
authorTomas Mlcoch <tmlcoch@redhat.com>
Thu, 10 May 2012 12:18:14 +0000 (14:18 +0200)
committerTomas Mlcoch <tmlcoch@redhat.com>
Thu, 10 May 2012 12:18:14 +0000 (14:18 +0200)
CMakeLists.txt
doc/CMakeLists.txt
doc/createrepo_c.8.gz
doc/mergerepo_c.8.gz [new file with mode: 0644]
src/CMakeLists.txt
utils/gen_manpage.sh
utils/gen_rst.py
utils/make_tarball.sh

index 100ba2b..fdd9e54 100644 (file)
@@ -123,8 +123,10 @@ INCLUDE(CPack)
 
 SET(CMAKE_INSTALL_PREFIX "/")
 
-#INSTALL_FILES(/usr/share/doc/createrepo_c-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH} FILES README COPYING COPYING.lib)
-install(FILES README COPYING COPYING.lib DESTINATION "/usr/share/doc/createrepo_c-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
+INSTALL(FILES README
+              COPYING
+              COPYING.lib
+              DESTINATION "/usr/share/doc/createrepo_c-${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}.${CPACK_PACKAGE_VERSION_PATCH}")
 
 
 # Gen manpage
index d0da8ca..3059a72 100644 (file)
@@ -1 +1 @@
-INSTALL_FILES(/usr/share/man/man8 FILES createrepo_c.8.gz)
\ No newline at end of file
+INSTALL(FILES createrepo_c.8.gz mergerepo_c.8.gz  DESTINATION /usr/share/man/man8)
index e4ffd64..81ff8b9 100644 (file)
Binary files a/doc/createrepo_c.8.gz and b/doc/createrepo_c.8.gz differ
diff --git a/doc/mergerepo_c.8.gz b/doc/mergerepo_c.8.gz
new file mode 100644 (file)
index 0000000..d2ba13d
Binary files /dev/null and b/doc/mergerepo_c.8.gz differ
index 5fde0b4..0fbf53b 100644 (file)
@@ -12,7 +12,7 @@ TARGET_LINK_LIBRARIES(libcreaterepo_c ${Libmagic_LIBRARY})
 TARGET_LINK_LIBRARIES(libcreaterepo_c ${LIBXML2_LIBRARIES})
 TARGET_LINK_LIBRARIES(libcreaterepo_c ${EXPAT_LIBRARIES})
 TARGET_LINK_LIBRARIES(libcreaterepo_c ${CURL_LIBRARY})
-SET_TARGET_PROPERTIES(libcreaterepo_c PROPERTIES OUTPUT_NAME "createrepo_c")
+SET_TARGET_PROPERTIES(libcreaterepo_c PROPERTIES OUTPUT_NAME "createrepo_c-0")
 
 ADD_EXECUTABLE(createrepo_c createrepo_c.c cmd_parser.c)
 TARGET_LINK_LIBRARIES(createrepo_c libcreaterepo_c ${GLIB2_LIBRARIES} ${GTHREAD2_LIBRARIES})
index 9691b9a..962734f 100755 (executable)
@@ -2,16 +2,17 @@
 
 # /usr/share/man/man8/createrepo_c.8.gz
 
-EXPECTED_ARGS=2
+EXPECTED_ARGS=3
 if [ $# -ne $EXPECTED_ARGS ]
 then
-    echo "Usage: `basename $0` <input_file> <outputdir>"
+    echo "Usage: `basename $0` <createrepo_input_file> <mergerepo_input_file> <outputdir>"
     echo
-    echo "Example: `basename $0` ../src/cmd_parser.c ../doc/"
+    echo "Example: `basename $0` ../src/cmd_parser.c ../src/mergerepo_c.c ../doc/"
     exit 1
 fi
 
 MY_DIR=`dirname $0`
 MY_DIR="$MY_DIR/"
 
-python $MY_DIR/gen_rst.py $1 | rst2man | gzip > $2/createrepo_c.8.gz
+python $MY_DIR/gen_rst.py $1 | rst2man | gzip > $3/createrepo_c.8.gz
+python $MY_DIR/gen_rst.py $2 --mergerepo | rst2man | gzip > $3/mergerepo_c.8.gz
index c67d485..8554132 100755 (executable)
@@ -133,8 +133,8 @@ def parse_arguments_from_c_file(filename):
 
 
 if __name__ == "__main__":
-    parser = OptionParser('usage: %prog [options] <filename>')
-    #parser.add_option('-o', '--outputdir', help="...")
+    parser = OptionParser('usage: %prog [options] <filename> [--mergerepo]')
+    parser.add_option('-m', '--mergerepo', action="store_true", help="Gen rst for mergerepo")
     options, args = parser.parse_args()
 
     if len(args) < 1:
@@ -143,12 +143,19 @@ if __name__ == "__main__":
 
     args = parse_arguments_from_c_file(args[0])
 
-    NAME="createrepo_c"
-
-    info = Info(NAME,
+    if not options.mergerepo:
+        NAME = "createrepo_c"
+        info = Info(NAME,
                 description="C implementation of createrepo",
                 synopsis="%s [options] <directory>" % (NAME,),
                 options=args)
+    else:
+        NAME = "mergerepo_c"
+        info = Info(NAME,
+                description="C implementation of mergerepo",
+                synopsis="%s [options] <directory>" % (NAME,),
+                options=args)
+
     ret = info.gen_rst()
     if not ret:
         print >> sys.stderr, "Error: Rst has not been generated"
index 559e990..a1a8b19 100755 (executable)
@@ -38,6 +38,7 @@ echo "Using root projekt dir: $PREFIX"
 
     cp --verbose --parents doc/CMakeLists.txt $DIRECTORY
     cp --verbose --parents doc/createrepo_c.8.gz $DIRECTORY
+    cp --verbose --parents doc/mergerepo_c.8.gz $DIRECTORY
 
     cp --verbose --parents src/CMakeLists.txt $DIRECTORY
     cp --verbose --parents src/*.c $DIRECTORY