You seem to ask for a DRM system. Licensing generally means "describing what rights the end user has".
As Zoopster pointed out, there is no standard way to implement such a system. Moreover, there is no foolproof way. Even the biggest commercial companies eventually see their software "cracked" sooner or later.
It seems to be discouraged, but if you still want a DRM system, developing your own DRM system shouldn't be hard if you have a basic understanding of web applications.
You could have a very simple database with "keys" (commonly called serial keys, activation keys, etc.).
- Each time you "sell" a copy, a random key is generated and added to the database.
The generated key is also given (e.g. sent by email) to the user.
- The user then enters this key during the installation or the first use of the application.
- Your installer/application sends this key to your key-validation service and the service "replies" with a positive answer, allowing the installer/application to proceed.
- If the validation was successful, you might want to delete the key from the database to prevent its re-use. An alternative solution would be to allow multiple installations with a single key (that is, use a "counter" for each key, for example).
- You would need to develop a small web solution that handles the distribution and validation of the keys.
- You would have to add the required functionality to your application, or develop an installer, that communicates with your web service.
And since you seem to be interested in using the Ubuntu Software Center, you'll want to focus on a "validation on first run", because your application will be distributed as a .deb package (that is, your application gets installed by the packet manager, not by your own installer).