Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Property replacement in copyright file #279

Closed
surli opened this issue Sep 6, 2018 · 5 comments
Closed

Property replacement in copyright file #279

surli opened this issue Sep 6, 2018 · 5 comments

Comments

@surli
Copy link

surli commented Sep 6, 2018

Is it possible to make jdeb substituing value in another file than the control file: I've an example where I had that line in my control file:

License: [[debian.license]]

which was working properly using the variable defined in my pom, but I now want to create a specific copyright file (as suggested in https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/), so I created the copyright file with the exact same line, now how to tell jdeb to realize the value substitution the same way?

(for the record this one is indirectly related to #106 ;) )

@surli surli changed the title Substituing value in a custom file Property replacement in copyright file Sep 6, 2018
@Sami32
Copy link

Sami32 commented Sep 6, 2018

I use 'maven-resources-plugin' for that.

@surli
Copy link
Author

surli commented Sep 6, 2018

Going toward this solution, do you have some examples to provide by any chance?

@Sami32
Copy link

Sami32 commented Sep 6, 2018

Into my copyright file:

Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: ${project.name.linux}
Upstream-Contact: ${project.maintainer}
Source: ${project.scm.url}/releases
Licence: GPL-3+
Copyright: Copyleft (þ) ${project.inceptionDate}-${current.year} ${project.name}.

Files: *
Copyright: Copyleft (þ) ${project.inceptionDate}-${current.year} ${project.name}.
Licence: GPL-3+
 This program is free software; you can redistribute it and/or modify
 it under the terms of the GNU General Public License as published by
 the Free Software Foundation; either version 3 of the License, or any
 later version.
 .
 This program is distributed in the hope that it will be useful,
 but WITHOUT ANY WARRANTY; without even the implied warranty of
 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 GNU General Public License for more details.
 .
 You should have received a copy of the GNU General Public License with
 the Debian GNU/Linux distribution in file /usr/share/common-licenses/GPL-3;
 if not, write to the Free Software Foundation, Inc., 51 Franklin St,
 Fifth Floor, Boston, MA 02110-1301, USA
 .
 On Debian systems, the full text of the GNU General Public
 License version 3 can be found in the file
 `/usr/share/common-licenses/GPL-3'.

And in my pom.xml:

		<resources>
...
                       <resource>
				<directory>src/main/resources/linux/deb</directory>
				<includes>
					<include>changelog</include>
					<include>copyright</include>
					<include>README</include>
				</includes>
				<filtering>true</filtering>
				<targetPath>${project.build.directory}/deb</targetPath>
			</resource>
		</resources>

I hope that helped.

@Sami32
Copy link

Sami32 commented Sep 6, 2018

Maybe i should have added the jdeb related configuration files:

<dataSet>
										<data>
											<src>${project.build.directory}/deb</src>
											<type>directory</type>
											<includes>copyright, changelog.gz, README</includes>
											<mapper>
												<type>perm</type>
												<strip>1</strip>
												<prefix>/usr/share/doc/${project.name.linux}</prefix>
											</mapper>
										</data>
...

@surli
Copy link
Author

surli commented Sep 6, 2018

Thanks a lot!

@surli surli closed this as completed Sep 6, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants