I am trying to create an rpm
package using ant task
, for which I need to create a specfile
that will have all the file names in the following format
%attr(0755, root, root) %dir dir1 %attr(0755, root, root) %dir dir1/dir2 %attr(0755, root, root) %dir dir1/dir2/dir3 %attr(0500, root, root) dir1/file1 %attr(0500, root, root) dir1/dir2/file1
I have such a directory structure created during my build process, but using ant
I cannot list all the files and directories that I can write to my specfile
The following is what I was trying to list, but it does not distinguish between files and directory, in addition, I need a way to iterate over the list.
<fileset id="dist.contents" dir="${nativePackageDir}" includes="**"/> | <property name="prop.dist.contents" refid="dist.contents"/> | <target name="javaobject-library" depends="props"> <echo>${prop.dist.contents}</echo>
source share