Well if the government have sufficient grounds to look through your Laptop/Computer they can do that. ...
If they have a reason for doing it then i would vote Yes, ....
How easy is to loose perspective. How fast we are willing to give away freedom and privacy.
Customs used to mean taxes or duties at the border. Either if you came by ship, plane or walking. In order to collect those duties related to certain items, of course, some checking points were created, with the authority to search randomly among your traveling possessions, in order to verify that the right tax was collected.
For obvious reasons some items were confiscated for the immediate danger, e.g. ( guns, bazookas, grenades, and such ) and also for the illegality[1] of it, e.g. ( not buying from proper places subject to taxes; not obtaining proper permissions by paying on it ).
Drugs came along and the powers of customs officers were increased to confiscate these too and arrest the carrier. Since they were searching already, why not to search for these too; after all, no one wants drugs to come to the country, right? Fair enough.
Terrorism became a "buzz word" in security and things has dramatically changed.
The rest is present.
However, I keep wondering, how little is security, and government with our best interest in mind ( I chuckle ), and how much is government's opportunity to control and do those actions that a little ago wasn't possible for it to do.
Now, I ask you. What grounds are you talking about?
[1] Illegality comes down to whom you pay the money.